chainsyncer

Blockchain syncer driver
Log | Files | Refs | LICENSE

commit 21db6585755411e1f04f417d858967d0e51f68e0
parent 909b85b2b7c7f6e31ab480d18cc6532324d8ffde
Author: lash <dev@holbrook.no>
Date:   Tue, 10 May 2022 18:30:28 +0000

Add missing single flag

Diffstat:
Mchainsyncer/cli/arg.py | 1+
Mchainsyncer/cli/config.py | 2++
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/chainsyncer/cli/arg.py b/chainsyncer/cli/arg.py @@ -7,6 +7,7 @@ def process_flags(argparser, flags): if flags & SyncFlag.RANGE > 0: argparser.add_argument('--offset', type=int, help='Block to start sync from. Default is start of history (0).') argparser.add_argument('--until', type=int, default=-1, help='Block to stop sync on. Default is stop at block height of first run.') + argparser.add_argument('--single', action='store_true', help='Execute a single sync, regardless of previous states') if flags & SyncFlag.HEAD > 0: argparser.add_argument('--head', action='store_true', help='Start from latest block as offset') argparser.add_argument('--keep-alive', action='store_true', help='Do not stop syncing when caught up') diff --git a/chainsyncer/cli/config.py b/chainsyncer/cli/config.py @@ -17,4 +17,6 @@ def process_config(config, args, flags): config.add(getattr(args, 'keep_alive'), '_KEEP_ALIVE') config.add(getattr(args, 'head'), '_HEAD') + config.add(getattr(args, 'single'), '_SINGLE') + return config