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

Function mkblockmap

contrib/linearize/linearize-data.py:89–93  ·  view source on GitHub ↗
(blkindex)

Source from the content-addressed store, hash-verified

87
88# The block map shouldn't give or receive byte-reversed hashes.
89def mkblockmap(blkindex):
90 blkmap = {}
91 for height,hash in enumerate(blkindex):
92 blkmap[hash] = height
93 return blkmap
94
95# This gets the first block file ID that exists from the input block
96# file directory.

Callers 1

linearize-data.pyFile · 0.85

Calls 1

enumerateFunction · 0.50

Tested by

no test coverage detected