1
0

follow-up prev

Clean up tests a bit, and rm some of them.
It's overkill to test with SPV._raise_if_valid_tx mocked out.
This commit is contained in:
SomberNight
2020-02-25 20:45:17 +01:00
parent d4f7c207a7
commit 4f5f949979
2 changed files with 22 additions and 50 deletions

View File

@@ -149,7 +149,7 @@ class SPV(NetworkJobOnDefaultServer):
for item in merkle_branch_bytes:
if len(item) != 32:
raise MerkleVerificationFailure('all merkle branch items have to 32 bytes long')
inner_node = item + h if index & 1 else h + item
inner_node = (item + h) if (index & 1) else (h + item)
cls._raise_if_valid_tx(bh2u(inner_node))
h = sha256d(inner_node)
index >>= 1