mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
Support regtest in contrib/history.py
This commit is contained in:
parent
7baacab560
commit
c7eb0ba56a
@ -30,16 +30,21 @@ def show_rows(rows, field_names):
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--testnet', action='store_true')
|
||||
parser.add_argument('--network', default='mainnet')
|
||||
parser.add_argument('address', nargs='+')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.testnet:
|
||||
if args.network == 'regtest':
|
||||
port = 60401
|
||||
from pycoin.symbols.xrt import network
|
||||
elif args.network == 'testnet':
|
||||
port = 60001
|
||||
from pycoin.symbols.xtn import network
|
||||
else:
|
||||
elif args.network == 'mainnet':
|
||||
port = 50001
|
||||
from pycoin.symbols.btc import network
|
||||
else:
|
||||
raise ValueError(f"unknown network: {args.network}")
|
||||
|
||||
hostport = ('localhost', port)
|
||||
log.info('connecting to {}:{}', *hostport)
|
||||
|
Loading…
Reference in New Issue
Block a user