Skip to content

Commit cc6f551

Browse files
dagurvallaanwj
authored andcommitted
[qa] Fix compact block shortids for a test case
Github-Pull: #8904 Rebased-From: 4cdece40419bcc97345357f9268e03b0aff400b5
1 parent 4bb9ce8 commit cc6f551

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)