mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
Use COINBASE_MATURITY constant in functional tests.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test transaction signing using the signrawtransaction* RPCs."""
|
||||
|
||||
from test_framework.blocktools import COINBASE_MATURITY
|
||||
from test_framework.address import check_script, script_to_p2sh, script_to_p2wsh
|
||||
from test_framework.key import ECKey
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
@ -155,7 +156,7 @@ class SignRawTransactionsTest(BitcoinTestFramework):
|
||||
def test_fully_signed_tx(self):
|
||||
self.log.info("Test signing a fully signed transaction does nothing")
|
||||
self.nodes[0].walletpassphrase("password", 9999)
|
||||
self.nodes[0].generate(101)
|
||||
self.nodes[0].generate(COINBASE_MATURITY + 1)
|
||||
rawtx = self.nodes[0].createrawtransaction([], [{self.nodes[0].getnewaddress(): 10}])
|
||||
fundedtx = self.nodes[0].fundrawtransaction(rawtx)
|
||||
signedtx = self.nodes[0].signrawtransactionwithwallet(fundedtx["hex"])
|
||||
@ -174,7 +175,7 @@ class SignRawTransactionsTest(BitcoinTestFramework):
|
||||
embedded_pubkey = eckey.get_pubkey().get_bytes().hex()
|
||||
p2sh_p2wsh_address = self.nodes[1].createmultisig(1, [embedded_pubkey], "p2sh-segwit")
|
||||
# send transaction to P2SH-P2WSH 1-of-1 multisig address
|
||||
self.nodes[0].generate(101)
|
||||
self.nodes[0].generate(COINBASE_MATURITY + 1)
|
||||
self.nodes[0].sendtoaddress(p2sh_p2wsh_address["address"], 49.999)
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
Reference in New Issue
Block a user