From e881401c3d937edbb5b957ac6879278539603cef Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 23 Aug 2024 18:23:25 -0400 Subject: [PATCH] moved warnings filter to the top --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 1df65be..d87a18a 100644 --- a/main.py +++ b/main.py @@ -10,6 +10,7 @@ from web3 import Web3, HTTPProvider from common import * from logs import * +warnings.filterwarnings("ignore") web3 = Web3(HTTPProvider(os.getenv('RPC_SERVER'))) log_contract = web3.eth.contract( os.getenv('LOG_CONTRACT_ADDRESS'), @@ -17,6 +18,7 @@ log_contract = web3.eth.contract( ) block_cache = {} + async def keep_chat_updated(event_filter, poll_interval): while True: for event in event_filter.get_new_entries(): @@ -31,7 +33,6 @@ def preload_chat(earliest_block, latest_block): "topics": ["0x6b81130c485ac9b98332fa40c2e57900867815b0fe1497e1a168caf930fc9c9d"], "address": os.getenv('LOG_CONTRACT_ADDRESS') }) - warnings.filterwarnings("ignore") for log in event_logs: output_line(log)