moved warnings filter to the top
This commit is contained in:
parent
5e89dd29ab
commit
e881401c3d
1 changed files with 2 additions and 1 deletions
3
main.py
3
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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue