Merge branch 'fix_tx_merkle' into develop
This commit is contained in:
commit
25782d02d9
@ -395,8 +395,11 @@ class ElectrumX(Session):
|
|||||||
hex_hashes = await self.daemon.block_hex_hashes(height, 1)
|
hex_hashes = await self.daemon.block_hex_hashes(height, 1)
|
||||||
block = await self.daemon.deserialised_block(hex_hashes[0])
|
block = await self.daemon.deserialised_block(hex_hashes[0])
|
||||||
tx_hashes = block['tx']
|
tx_hashes = block['tx']
|
||||||
# This will throw if the tx_hash is bad
|
try:
|
||||||
pos = tx_hashes.index(tx_hash)
|
pos = tx_hashes.index(tx_hash)
|
||||||
|
except ValueError:
|
||||||
|
raise self.RPCError('tx hash {} not in block {} at height {:,d}'
|
||||||
|
.format(tx_hash, hex_hashes[0], height))
|
||||||
|
|
||||||
idx = pos
|
idx = pos
|
||||||
hashes = [hex_str_to_hash(txh) for txh in tx_hashes]
|
hashes = [hex_str_to_hash(txh) for txh in tx_hashes]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user