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

Allow only subscribing to scripthashes @ contrib/history.py

This commit is contained in:
Roman Zeyde 2022-01-29 08:51:39 +02:00
parent 953beea7a5
commit e101739607

View File

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