mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #8904: [qa] Fix compact block shortids for a test case
4cdece4
[qa] Fix compact block shortids for a test case (Dagur Valberg Johannsson)
This commit is contained in:
commit
e2a17e43e3
@ -402,7 +402,9 @@ class CompactBlocksTest(BitcoinTestFramework):
|
|||||||
comp_block = HeaderAndShortIDs()
|
comp_block = HeaderAndShortIDs()
|
||||||
comp_block.header = CBlockHeader(block)
|
comp_block.header = CBlockHeader(block)
|
||||||
comp_block.nonce = 0
|
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()))
|
test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p()))
|
||||||
assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock)
|
assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock)
|
||||||
# Expect a getblocktxn message.
|
# Expect a getblocktxn message.
|
||||||
|
Loading…
Reference in New Issue
Block a user