Skip to content

Commit 4cdece4

Browse files
committed
[qa] Fix compact block shortids for a test case
1 parent bf8e68a commit 4cdece4

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
@@ -382,7 +382,9 @@ def test_compactblock_requests(self, node, test_node):
382382
comp_block = HeaderAndShortIDs()
383383
comp_block.header = CBlockHeader(block)
384384
comp_block.nonce = 0
385-
comp_block.shortids = [1] # this is useless, and wrong
385+
[k0, k1] = comp_block.get_siphash_keys()
386+
comp_block.shortids = [
387+
calculate_shortid(k0, k1, block.vtx[0].sha256) ]
386388
test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p()))
387389
assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock)
388390
# Expect a getblocktxn message.

0 commit comments

Comments
 (0)