From 517e339544dd1977a6c6da49d7d59741b6877eb6 Mon Sep 17 00:00:00 2001 From: lash Date: Sat, 2 Apr 2022 07:32:31 +0000 Subject: [PATCH] Fix until flag --- eth_monitor/runnable/import.py | 2 +- eth_monitor/runnable/sync.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eth_monitor/runnable/import.py b/eth_monitor/runnable/import.py index c0e95b5..2a32dac 100644 --- a/eth_monitor/runnable/import.py +++ b/eth_monitor/runnable/import.py @@ -30,7 +30,7 @@ services = [ argparser = argparse.ArgumentParser('master eth events monitor') argparser.add_argument('--api-key-file', dest='api_key_file', type=str, help='File to read API key from') -argparser.add_argument('--cache-dir', dest='cache_dir', type=str, help='Directory to store tx data') +argparser.add_argument('--cache-dir', dest='cache_dir', type=str, default='.eth-monitor/cache', help='Directory to store tx data') argparser.add_argument('--store-tx-data', dest='store_tx_data', action='store_true', help='Include all transaction data objects by default') argparser.add_argument('--store-block-data', dest='store_block_data', action='store_true', help='Include all block data objects by default') argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string') diff --git a/eth_monitor/runnable/sync.py b/eth_monitor/runnable/sync.py index cb5e1bb..7f83e4b 100644 --- a/eth_monitor/runnable/sync.py +++ b/eth_monitor/runnable/sync.py @@ -278,8 +278,8 @@ def main(): session_block_offset = args.offset if args.until > 0: - if not args.head and args.until <= block_offset: - raise ValueError('sync termination block number must be later than offset ({} >= {})'.format(block_offset, args.until)) + if not args.head and args.until <= session_block_offset: + raise ValueError('sync termination block number must be later than offset ({} >= {})'.format(session_block_offset, args.until)) block_limit = args.until elif config.true('_KEEP_ALIVE'): keep_alive=True