[tests] Fix flake8 warnings in getblocktemplate tests

This commit is contained in:
John Newbery 2017-04-11 13:05:41 -04:00
parent 32cffe6bef
commit 0a3a5ff454
1 changed files with 9 additions and 14 deletions

View File

@ -75,7 +75,8 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
def run_test(self):
node = self.nodes[0]
node.generate(1) # Mine a block to leave initial block download
# Mine a block to leave initial block download
node.generate(1)
tmpl = node.getblocktemplate()
if 'coinbasetxn' not in tmpl:
rawcoinbase = encodeUNum(tmpl['height'])
@ -88,12 +89,6 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
# Test 0: Capability advertised
assert('proposal' in tmpl['capabilities'])
# NOTE: This test currently FAILS (regtest mode doesn't enforce block height in coinbase)
## Test 1: Bad height in coinbase
#txlist[0][4+1+36+1+1] += 1
#assert_template(node, tmpl, txlist, 'FIXME')
#txlist[0][4+1+36+1+1] -= 1
# Test 2: Bad input hash for gen tx
txlist[0][4 + 1] += 1
assert_template(node, tmpl, txlist, 'bad-cb-missing')