Browse Source

More of prior

patch-2
Neil Booth 6 years ago
parent
commit
5f4d7d9b5f
  1. 2
      electrumx/lib/merkle.py
  2. 2
      electrumx/server/session.py
  3. 2
      tests/lib/test_merkle.py

2
electrumx/lib/merkle.py

@ -129,7 +129,7 @@ class Merkle(object):
level cached.
To maximally reduce the amount of data hashed in computing a
markle branch, cache a tree of depth N at level N // 2.
merkle branch, cache a tree of depth N at level N // 2.
level is a list of hashes in the middle of the tree (returned
by level())

2
electrumx/server/session.py

@ -1183,7 +1183,7 @@ class ElectrumX(SessionBase):
return branch
async def transaction_merkle(self, tx_hash, height):
'''Return the markle branch to a confirmed transaction given its hash
'''Return the merkle branch to a confirmed transaction given its hash
and height.
tx_hash: the transaction hash as a hexadecimal string

2
tests/lib/test_merkle.py

@ -234,7 +234,7 @@ async def test_truncation_bad():
@pytest.mark.asyncio
async def test_markle_cache_bad():
async def test_merkle_cache_bad():
length = 23
source = Source(length).hashes
cache = MerkleCache(merkle, source)

Loading…
Cancel
Save