MCPcopy Create free account
hub / github.com/ElementsProject/elements / get_block_hashes

Function get_block_hashes

contrib/linearize/linearize-data.py:75–86  ·  view source on GitHub ↗
(settings)

Source from the content-addressed store, hash-verified

73
74# When getting the list of block hashes, undo any byte reversals.
75def get_block_hashes(settings):
76 blkindex = []
77 f = open(settings['hashlist'], "r", encoding="utf8")
78 for line in f:
79 line = line.rstrip()
80 if settings['rev_hash_bytes'] == 'true':
81 line = hex_switchEndian(line)
82 blkindex.append(line)
83
84 print("Read " + str(len(blkindex)) + " hashes")
85
86 return blkindex
87
88# The block map shouldn't give or receive byte-reversed hashes.
89def mkblockmap(blkindex):

Callers 1

linearize-data.pyFile · 0.70

Calls 1

hex_switchEndianFunction · 0.70

Tested by

no test coverage detected