Used black
This commit is contained in:
parent
f1431cec4c
commit
ce047e1f2a
@ -63,8 +63,12 @@ async def run():
|
||||
)
|
||||
|
||||
w3 = Web3(HTTPProvider(rpc))
|
||||
res = w3.provider.make_request('trace_block', ['earliest'])
|
||||
if 'error' in res and res['error']['message'] == 'the method trace_block does not exist/is not available':
|
||||
res = w3.provider.make_request("trace_block", ["earliest"])
|
||||
if (
|
||||
"error" in res
|
||||
and res["error"]["message"]
|
||||
== "the method trace_block does not exist/is not available"
|
||||
):
|
||||
type_e = RPCType.geth
|
||||
else:
|
||||
type_e = RPCType.parity
|
||||
@ -72,7 +76,6 @@ async def run():
|
||||
# type_e = convert_str_to_enum(sys.argv[1])
|
||||
inspector = MEVInspector(rpc, type_e)
|
||||
|
||||
|
||||
while not killer.kill_now:
|
||||
await inspect_next_block(
|
||||
inspector,
|
||||
|
@ -38,7 +38,11 @@ async def create_from_block_number(
|
||||
trace_db_session: Optional[orm.Session],
|
||||
) -> Block:
|
||||
|
||||
type = RPCType.geth if geth_poa_middleware in w3.provider.middlewares else RPCType.parity
|
||||
type = (
|
||||
RPCType.geth
|
||||
if geth_poa_middleware in w3.provider.middlewares
|
||||
else RPCType.parity
|
||||
)
|
||||
if type == RPCType.geth:
|
||||
block_json = await w3.eth.get_block(block_number)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user