aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-10-13 18:47:45 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-10-13 18:48:13 +0200
commite2a17e43e36ff760bf54ce0fc91d9464257c7222 (patch)
tree99c12b9ede56fb7100abf580549cb7e27135ebec /qa/rpc-tests
parent8d46429c83ec3815d0c595bf541ef5557c6b4942 (diff)
parent4cdece40419bcc97345357f9268e03b0aff400b5 (diff)
Merge #8904: [qa] Fix compact block shortids for a test case
4cdece4 [qa] Fix compact block shortids for a test case (Dagur Valberg Johannsson)
Diffstat (limited to 'qa/rpc-tests')
-rwxr-xr-xqa/rpc-tests/p2p-compactblocks.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py
index cdcfb36e7b..e7f5a1c9c6 100755
--- a/qa/rpc-tests/p2p-compactblocks.py
+++ b/qa/rpc-tests/p2p-compactblocks.py
@@ -402,7 +402,9 @@ class CompactBlocksTest(BitcoinTestFramework):
comp_block = HeaderAndShortIDs()
comp_block.header = CBlockHeader(block)
comp_block.nonce = 0
- comp_block.shortids = [1] # this is useless, and wrong
+ [k0, k1] = comp_block.get_siphash_keys()
+ comp_block.shortids = [
+ calculate_shortid(k0, k1, block.vtx[0].sha256) ]
test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p()))
assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock)
# Expect a getblocktxn message.