mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
[tests] run successful test in getblocktemplate first
This commit is contained in:
parent
82dc59706e
commit
9bf0d80ab0
1 changed files with 3 additions and 3 deletions
|
@ -50,6 +50,9 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
|
||||||
block.nNonce = 0
|
block.nNonce = 0
|
||||||
block.vtx = [coinbase_tx]
|
block.vtx = [coinbase_tx]
|
||||||
|
|
||||||
|
self.log.info("getblocktemplate: Test valid block")
|
||||||
|
assert_template(node, block, None)
|
||||||
|
|
||||||
self.log.info("getblocktemplate: Test bad input hash for coinbase transaction")
|
self.log.info("getblocktemplate: Test bad input hash for coinbase transaction")
|
||||||
bad_block = copy.deepcopy(block)
|
bad_block = copy.deepcopy(block)
|
||||||
bad_block.vtx[0].vin[0].prevout.hash += 1
|
bad_block.vtx[0].vin[0].prevout.hash += 1
|
||||||
|
@ -104,9 +107,6 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
|
||||||
bad_block.nTime = 0
|
bad_block.nTime = 0
|
||||||
assert_template(node, bad_block, 'time-too-old')
|
assert_template(node, bad_block, 'time-too-old')
|
||||||
|
|
||||||
self.log.info("getblocktemplate: Test valid block")
|
|
||||||
assert_template(node, block, None)
|
|
||||||
|
|
||||||
self.log.info("getblocktemplate: Test not best block")
|
self.log.info("getblocktemplate: Test not best block")
|
||||||
bad_block = copy.deepcopy(block)
|
bad_block = copy.deepcopy(block)
|
||||||
bad_block.hashPrevBlock = 123
|
bad_block.hashPrevBlock = 123
|
||||||
|
|
Loading…
Add table
Reference in a new issue