diff options
Diffstat (limited to 'contrib/linearize')
-rw-r--r-- | contrib/linearize/README.md | 2 | ||||
-rw-r--r-- | contrib/linearize/example-linearize.cfg | 7 | ||||
-rwxr-xr-x | contrib/linearize/linearize-hashes.py | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md index f2a2ab2768..2985106982 100644 --- a/contrib/linearize/README.md +++ b/contrib/linearize/README.md @@ -46,7 +46,7 @@ linearize-hashes.py. (Default: `1000*1000*1000 bytes`) * `netmagic`: Network magic number. * `out_of_order_cache_sz`: If out-of-order blocks are being read, the block can -be written to a cache so that the blockchain doesn't have to be seeked again. +be written to a cache so that the blockchain doesn't have to be sought again. This option specifies the cache size. (Default: `100*1000*1000 bytes`) * `rev_hash_bytes`: If true, the block hash list written by linearize-hashes.py will be byte-reversed when read by linearize-data.py. See the linearize-hashes 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']) |