Permalink
Browse files

[tests] run successful test in getblocktemplate first

  • Loading branch information...
1 parent 82dc597 commit 9bf0d80ab07ede52629960b2478beff55401a51b @jnewbery jnewbery committed Apr 11, 2017
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/functional/getblocktemplate_proposals.py
@@ -50,6 +50,9 @@ def run_test(self):
block.nNonce = 0
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")
bad_block = copy.deepcopy(block)
bad_block.vtx[0].vin[0].prevout.hash += 1
@@ -104,9 +107,6 @@ def run_test(self):
bad_block.nTime = 0
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")
bad_block = copy.deepcopy(block)
bad_block.hashPrevBlock = 123

0 comments on commit 9bf0d80

Please sign in to comment.