1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00

Allow skipping merkle proof downloads in history.py (#915)

This commit is contained in:
Roman Zeyde 2023-08-11 23:08:02 +03:00 committed by GitHub
parent 6171dd627c
commit aa08c2ad9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@ def main():
parser.add_argument('--network', default='mainnet') parser.add_argument('--network', default='mainnet')
parser.add_argument('address', nargs='+') parser.add_argument('address', nargs='+')
parser.add_argument('--only-subscribe', action='store_true', default=False) 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() args = parser.parse_args()
if args.network == 'regtest': if args.network == 'regtest':
@ -117,6 +118,9 @@ def main():
timestamps_map = dict(zip(heights, timestamps)) timestamps_map = dict(zip(heights, timestamps))
log.info('loaded {} header timestamps', len(heights)) log.info('loaded {} header timestamps', len(heights))
if args.no_merkle_proofs:
return
proofs = conn.call( proofs = conn.call(
client.request('blockchain.transaction.get_merkle', txid, height) client.request('blockchain.transaction.get_merkle', txid, height)
for txid, height in confirmed_txids.items() for txid, height in confirmed_txids.items()