Skip to content

Commit e2a17e4

Browse files
committed
Merge #8904: [qa] Fix compact block shortids for a test case
4cdece4 [qa] Fix compact block shortids for a test case (Dagur Valberg Johannsson)
2 parents 8d46429 + 4cdece4 commit e2a17e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qa/rpc-tests/p2p-compactblocks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ def test_compactblock_requests(self, node, test_node):
402402
comp_block = HeaderAndShortIDs()
403403
comp_block.header = CBlockHeader(block)
404404
comp_block.nonce = 0
405-
comp_block.shortids = [1] # this is useless, and wrong
405+
[k0, k1] = comp_block.get_siphash_keys()
406+
comp_block.shortids = [
407+
calculate_shortid(k0, k1, block.vtx[0].sha256) ]
406408
test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p()))
407409
assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock)
408410
# Expect a getblocktxn message.

0 commit comments

Comments
 (0)