mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
[tests] Fix flake8 warnings in getblocktemplate tests
This commit is contained in:
parent
32cffe6bef
commit
0a3a5ff454
1 changed files with 9 additions and 14 deletions
|
@ -75,7 +75,8 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
node = self.nodes[0]
|
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()
|
tmpl = node.getblocktemplate()
|
||||||
if 'coinbasetxn' not in tmpl:
|
if 'coinbasetxn' not in tmpl:
|
||||||
rawcoinbase = encodeUNum(tmpl['height'])
|
rawcoinbase = encodeUNum(tmpl['height'])
|
||||||
|
@ -88,12 +89,6 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
|
||||||
# Test 0: Capability advertised
|
# Test 0: Capability advertised
|
||||||
assert('proposal' in tmpl['capabilities'])
|
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
|
# Test 2: Bad input hash for gen tx
|
||||||
txlist[0][4 + 1] += 1
|
txlist[0][4 + 1] += 1
|
||||||
assert_template(node, tmpl, txlist, 'bad-cb-missing')
|
assert_template(node, tmpl, txlist, 'bad-cb-missing')
|
||||||
|
|
Loading…
Add table
Reference in a new issue