From e1017396070f81a322446bb51ec2a7506bc46b6f Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 29 Jan 2022 08:51:39 +0200 Subject: [PATCH] Allow only subscribing to scripthashes @ contrib/history.py --- contrib/history.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/history.py b/contrib/history.py index 436963e..f56688c 100755 --- a/contrib/history.py +++ b/contrib/history.py @@ -32,6 +32,7 @@ def main(): parser.add_argument('--host', default='localhost') parser.add_argument('--network', default='mainnet') parser.add_argument('address', nargs='+') + parser.add_argument('--only-subscribe', action='store_true', default=False) args = parser.parse_args() if args.network == 'regtest': @@ -62,6 +63,8 @@ def main(): for script_hash in script_hashes ) log.info('subscribed to {} scripthashes', len(script_hashes)) + if args.only_subscribe: + return balances = conn.call( client.request('blockchain.scripthash.get_balance', script_hash)