4
0
mirror of git://holbrook.no/eth-monitor.git synced 2024-11-22 04:16:45 +01:00

Fix until flag

This commit is contained in:
lash 2022-04-02 07:32:31 +00:00
parent 72f0e779c2
commit 517e339544
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 3 additions and 3 deletions

View File

@ -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')

View File

@ -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