aboutsummaryrefslogtreecommitdiff
path: root/contrib/linearize
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/linearize')
-rw-r--r--contrib/linearize/example-linearize.cfg7
-rwxr-xr-xcontrib/linearize/linearize-hashes.py4
2 files changed, 9 insertions, 2 deletions
diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index d019b06b6c..2315898bf1 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -3,9 +3,16 @@ rpcuser=someuser
rpcpassword=somepassword
#datadir=~/.bitcoin
host=127.0.0.1
+
+#mainnet default
port=8332
+
+#testnet default
#port=18332
+#regtest default
+#port=18443
+
# bootstrap.dat hashlist settings (linearize-hashes)
max_height=313000
diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py
index db8eb7021e..58fec6dddc 100755
--- a/contrib/linearize/linearize-hashes.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -87,7 +87,7 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
for x,resp_obj in enumerate(reply):
if rpc.response_is_error(resp_obj):
print('JSON-RPC: error at height', height+x, ': ', resp_obj['error'], file=sys.stderr)
- exit(1)
+ sys.exit(1)
assert(resp_obj['id'] == x) # assume replies are in-sequence
if settings['rev_hash_bytes'] == 'true':
resp_obj['result'] = hex_switchEndian(resp_obj['result'])
@@ -140,7 +140,7 @@ if __name__ == '__main__':
if 'datadir' in settings and not use_userpass:
use_datadir = True
if not use_userpass and not use_datadir:
- print("Missing datadir or username and/or password in cfg file", file=stderr)
+ print("Missing datadir or username and/or password in cfg file", file=sys.stderr)
sys.exit(1)
settings['port'] = int(settings['port'])