[Tests] Cleanup extra instances of create_transaction

This commit is contained in:
Conor Scott
2018-07-30 10:16:40 +02:00
parent 157651855f
commit 736f941424
9 changed files with 46 additions and 73 deletions

View File

@@ -55,7 +55,7 @@ from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
from test_framework.blocktools import create_block, create_coinbase, create_transaction
from test_framework.blocktools import create_block, create_coinbase, create_tx_with_script
class AcceptBlockTest(BitcoinTestFramework):
@@ -244,7 +244,7 @@ class AcceptBlockTest(BitcoinTestFramework):
block_290f.solve()
block_291 = create_block(block_290f.sha256, create_coinbase(291), block_290f.nTime+1)
# block_291 spends a coinbase below maturity!
block_291.vtx.append(create_transaction(block_290f.vtx[0], 0, b"42", 1))
block_291.vtx.append(create_tx_with_script(block_290f.vtx[0], 0, script_sig=b"42", amount=1))
block_291.hashMerkleRoot = block_291.calc_merkle_root()
block_291.solve()
block_292 = create_block(block_291.sha256, create_coinbase(292), block_291.nTime+1)