raw gas data checked in
This commit is contained in:
@@ -28,7 +28,7 @@ if __name__ == '__main__':
|
||||
|
||||
num_blocks = 10000
|
||||
w3 = Web3(Web3.HTTPProvider(rpc_url, request_kwargs={'timeout':15}))
|
||||
gas_data = pd.DataFrame(columns=['gas_used'])
|
||||
gas_data = pd.DataFrame(columns=['gas'])
|
||||
end_block = w3.eth.block_number
|
||||
start_block = end_block - num_blocks
|
||||
|
||||
@@ -60,7 +60,7 @@ if __name__ == '__main__':
|
||||
gas_used = process_transaction(tx, w3)
|
||||
|
||||
if gas_used:
|
||||
new_data = pd.DataFrame({'gas_used': [gas_used]})
|
||||
new_data = pd.DataFrame({'gas': [gas_used]})
|
||||
gas_data = pd.concat([gas_data, new_data], ignore_index=True)
|
||||
log.info(f"Transaction {event['transactionHash'].hex()}: Gas used {gas_used}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user