From aa08c2ad9ad51c1cc4e21d5ac616955c9f0c214e Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Fri, 11 Aug 2023 23:08:02 +0300 Subject: [PATCH] Allow skipping merkle proof downloads in `history.py` (#915) --- contrib/history.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/history.py b/contrib/history.py index f56688c..ac4867e 100755 --- a/contrib/history.py +++ b/contrib/history.py @@ -33,6 +33,7 @@ def main(): parser.add_argument('--network', default='mainnet') parser.add_argument('address', nargs='+') parser.add_argument('--only-subscribe', action='store_true', default=False) + parser.add_argument('--no-merkle-proofs', action='store_true', default=False) args = parser.parse_args() if args.network == 'regtest': @@ -117,6 +118,9 @@ def main(): timestamps_map = dict(zip(heights, timestamps)) log.info('loaded {} header timestamps', len(heights)) + if args.no_merkle_proofs: + return + proofs = conn.call( client.request('blockchain.transaction.get_merkle', txid, height) for txid, height in confirmed_txids.items()