From a2dc8908df66af5fdac3e0647fa5406f1cfaf67a Mon Sep 17 00:00:00 2001 From: Luke Van Seters Date: Wed, 17 Nov 2021 15:11:26 -0500 Subject: [PATCH] Save block during inspection --- mev_inspect/inspect_block.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mev_inspect/inspect_block.py b/mev_inspect/inspect_block.py index c517923..de955fb 100644 --- a/mev_inspect/inspect_block.py +++ b/mev_inspect/inspect_block.py @@ -11,6 +11,10 @@ from mev_inspect.crud.arbitrages import ( delete_arbitrages_for_block, write_arbitrages, ) +from mev_inspect.crud.blocks import ( + delete_block, + write_block, +) from mev_inspect.crud.traces import ( delete_classified_traces_for_block, write_classified_traces, @@ -53,6 +57,9 @@ async def inspect_block( logger.info(f"Block: {block_number} -- Total traces: {len(block.traces)}") + delete_block(inspect_db_session, block_number) + write_block(inspect_db_session, block) + total_transactions = len( set(t.transaction_hash for t in block.traces if t.transaction_hash is not None) )