Browse Source

merkle.py: clean up

patch-2
Neil Booth 6 years ago
parent
commit
22a8b0727c
  1. 3
      electrumx/lib/merkle.py

3
electrumx/lib/merkle.py

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

Loading…
Cancel
Save