|
|
@ -88,7 +88,7 @@ class Merkle(object): |
|
|
|
|
|
|
|
def root(self, hashes, length=None): |
|
|
|
'''Return the merkle root of a non-empty iterable of binary hashes.''' |
|
|
|
branch, root = self.branch_and_root(hashes, 0, length) |
|
|
|
_branch, root = self.branch_and_root(hashes, 0, length) |
|
|
|
return root |
|
|
|
|
|
|
|
def root_from_proof(self, hash, branch, index): |
|
|
@ -169,6 +169,7 @@ class MerkleCache(object): |
|
|
|
self.merkle = merkle |
|
|
|
self.source_func = source_func |
|
|
|
self.length = 0 |
|
|
|
self.level = [] |
|
|
|
self.depth_higher = 0 |
|
|
|
self.initialized = Event() |
|
|
|
|
|
|
|