From c067c031a2bfce9d7793a95cb9bcb2e5160acb26 Mon Sep 17 00:00:00 2001 From: nolash Date: Tue, 13 Apr 2021 17:37:12 +0200 Subject: [PATCH] Correct progress callback --- apps/cic-eth/requirements.txt | 2 +- apps/contract-migration/scripts/cic_eth/import_balance.py | 6 +++--- apps/contract-migration/scripts/eth/import_balance.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/cic-eth/requirements.txt b/apps/cic-eth/requirements.txt index 150a2cfe..92ce8c4f 100644 --- a/apps/cic-eth/requirements.txt +++ b/apps/cic-eth/requirements.txt @@ -2,7 +2,7 @@ cic-base~=0.1.2a67 celery==4.4.7 crypto-dev-signer~=0.4.14a17 confini~=0.3.6rc3 -cic-eth-registry~=0.5.4a12 +cic-eth-registry~=0.5.4a13 #cic-bancor~=0.0.6 redis==3.5.3 alembic==1.4.2 diff --git a/apps/contract-migration/scripts/cic_eth/import_balance.py b/apps/contract-migration/scripts/cic_eth/import_balance.py index 019c59d7..2067d197 100644 --- a/apps/contract-migration/scripts/cic_eth/import_balance.py +++ b/apps/contract-migration/scripts/cic_eth/import_balance.py @@ -204,8 +204,8 @@ class Handler: # return b -def progress_callback(block_number, tx_index, s): - sys.stdout.write(str(s).ljust(200) + "\n") +def progress_callback(block_number, tx_index): + sys.stdout.write(str(block_number).ljust(200) + "\n") @@ -299,7 +299,7 @@ def main(): f.close() syncer_backend.set(block_offset, 0) - syncer = HeadSyncer(syncer_backend, post_callback=progress_callback) + syncer = HeadSyncer(syncer_backend, block_callback=progress_callback) handler = Handler(conn, chain_spec, user_dir, balances, sarafu_token_address, signer, gas_oracle, nonce_oracle) syncer.add_filter(handler) syncer.loop(1, conn) diff --git a/apps/contract-migration/scripts/eth/import_balance.py b/apps/contract-migration/scripts/eth/import_balance.py index 019c59d7..2067d197 100644 --- a/apps/contract-migration/scripts/eth/import_balance.py +++ b/apps/contract-migration/scripts/eth/import_balance.py @@ -204,8 +204,8 @@ class Handler: # return b -def progress_callback(block_number, tx_index, s): - sys.stdout.write(str(s).ljust(200) + "\n") +def progress_callback(block_number, tx_index): + sys.stdout.write(str(block_number).ljust(200) + "\n") @@ -299,7 +299,7 @@ def main(): f.close() syncer_backend.set(block_offset, 0) - syncer = HeadSyncer(syncer_backend, post_callback=progress_callback) + syncer = HeadSyncer(syncer_backend, block_callback=progress_callback) handler = Handler(conn, chain_spec, user_dir, balances, sarafu_token_address, signer, gas_oracle, nonce_oracle) syncer.add_filter(handler) syncer.loop(1, conn)