mirror of
git://holbrook.no/eth-monitor.git
synced 2024-11-23 20:26:45 +01:00
Fix until flag
This commit is contained in:
parent
72f0e779c2
commit
517e339544
@ -30,7 +30,7 @@ services = [
|
|||||||
|
|
||||||
argparser = argparse.ArgumentParser('master eth events monitor')
|
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('--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-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('--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')
|
argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string')
|
||||||
|
@ -278,8 +278,8 @@ def main():
|
|||||||
session_block_offset = args.offset
|
session_block_offset = args.offset
|
||||||
|
|
||||||
if args.until > 0:
|
if args.until > 0:
|
||||||
if not args.head and args.until <= block_offset:
|
if not args.head and args.until <= session_block_offset:
|
||||||
raise ValueError('sync termination block number must be later than offset ({} >= {})'.format(block_offset, args.until))
|
raise ValueError('sync termination block number must be later than offset ({} >= {})'.format(session_block_offset, args.until))
|
||||||
block_limit = args.until
|
block_limit = args.until
|
||||||
elif config.true('_KEEP_ALIVE'):
|
elif config.true('_KEEP_ALIVE'):
|
||||||
keep_alive=True
|
keep_alive=True
|
||||||
|
Loading…
Reference in New Issue
Block a user