From 0e45f22de8b9e44b16f08ab832e0da39d711b151 Mon Sep 17 00:00:00 2001 From: Luke Van Seters Date: Tue, 20 Jul 2021 19:40:44 -0400 Subject: [PATCH] Add output to testing file to make sure all looks good --- testing_file.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testing_file.py b/testing_file.py index 8e824dd..080284f 100644 --- a/testing_file.py +++ b/testing_file.py @@ -24,6 +24,12 @@ base_provider = Web3.HTTPProvider(args.rpc) ## Get block data that we need block_data = block.create_from_block_number(args.block_number[0], base_provider) +print(f"Total traces: {len(block_data.traces)}") + +total_transactions = len( + set(t.transaction_hash for t in block_data.traces if t.transaction_hash is not None) +) +print(f"Total transactions: {total_transactions}") ## Build a Uniswap inspector uniswap_inspector = UniswapInspector(base_provider) @@ -31,4 +37,5 @@ uniswap_inspector = UniswapInspector(base_provider) ## Create a processor, pass in an ARRAY of inspects processor = Processor([uniswap_inspector, uniswap_inspector]) -processor.get_transaction_evaluations(block_data) +classifications = processor.get_transaction_evaluations(block_data) +print(f"Returned {len(classifications)} classifications")