mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-09-06 20:02:31 +00:00
Merge pull request #281 from thrasher-/master
Litecoin: Fix p2p-compactblocks.py test hang
This commit is contained in:
commit
0ece87f1c5
@ -10,6 +10,8 @@ from test_framework.blocktools import create_block, create_coinbase, add_witness
|
|||||||
from test_framework.siphash import siphash256
|
from test_framework.siphash import siphash256
|
||||||
from test_framework.script import CScript, OP_TRUE
|
from test_framework.script import CScript, OP_TRUE
|
||||||
|
|
||||||
|
VB_TOP_BITS = 0x20000000
|
||||||
|
|
||||||
'''
|
'''
|
||||||
CompactBlocksTest -- test compact blocks (BIP 152)
|
CompactBlocksTest -- test compact blocks (BIP 152)
|
||||||
|
|
||||||
@ -128,7 +130,7 @@ class CompactBlocksTest(BitcoinTestFramework):
|
|||||||
tip = node.getbestblockhash()
|
tip = node.getbestblockhash()
|
||||||
mtp = node.getblockheader(tip)['mediantime']
|
mtp = node.getblockheader(tip)['mediantime']
|
||||||
block = create_block(int(tip, 16), create_coinbase(height + 1), mtp + 1)
|
block = create_block(int(tip, 16), create_coinbase(height + 1), mtp + 1)
|
||||||
block.nVersion = 4
|
block.nVersion = VB_TOP_BITS
|
||||||
if segwit:
|
if segwit:
|
||||||
add_witness_commitment(block)
|
add_witness_commitment(block)
|
||||||
block.solve()
|
block.solve()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user