Changeset View
Changeset View
Standalone View
Standalone View
contrib/linearize/linearize-hashes.py
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | if 'port' not in settings: | ||||
settings['port'] = 8332 | settings['port'] = 8332 | ||||
if 'min_height' not in settings: | if 'min_height' not in settings: | ||||
settings['min_height'] = 0 | settings['min_height'] = 0 | ||||
if 'max_height' not in settings: | if 'max_height' not in settings: | ||||
settings['max_height'] = 313000 | settings['max_height'] = 313000 | ||||
if 'rev_hash_bytes' not in settings: | if 'rev_hash_bytes' not in settings: | ||||
settings['rev_hash_bytes'] = 'false' | settings['rev_hash_bytes'] = 'false' | ||||
if 'rpcuser' not in settings or 'rpcpassword' not in settings: | if 'rpcuser' not in settings or 'rpcpassword' not in settings: | ||||
print("Missing username and/or password in cfg file", file=stderr) | print("Missing username and/or password in cfg file", file=sys.stderr) | ||||
sys.exit(1) | sys.exit(1) | ||||
settings['port'] = int(settings['port']) | settings['port'] = int(settings['port']) | ||||
settings['min_height'] = int(settings['min_height']) | settings['min_height'] = int(settings['min_height']) | ||||
settings['max_height'] = int(settings['max_height']) | settings['max_height'] = int(settings['max_height']) | ||||
# Force hash byte format setting to be lowercase to make comparisons easier. | # Force hash byte format setting to be lowercase to make comparisons easier. | ||||
settings['rev_hash_bytes'] = settings['rev_hash_bytes'].lower() | settings['rev_hash_bytes'] = settings['rev_hash_bytes'].lower() | ||||
get_block_hashes(settings) | get_block_hashes(settings) |