There was an error while loading. Please reload this page.
2 parents ef8045d + 994a980 commit 8383ed7Copy full SHA for 8383ed7
lib/logstash/inputs/protocols/ethereum.rb
@@ -30,7 +30,7 @@ def get_block_count
30
public
31
def get_block(height)
32
# get the block data
33
- block_data = make_rpc_call('eth_getBlockByNumber', height, true)
+ block_data = make_rpc_call('eth_getBlockByNumber', hexprefix(height), true)
34
35
# get all transaction data
36
tx_info = block_data.delete('transactions')
@@ -57,6 +57,10 @@ def unhex(data, num_keys)
57
end
58
59
60
+
61
+ def hexprefix(param)
62
+ return '0x' + param.to_s
63
+ end
64
65
66
class String
0 commit comments