mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 10:19:26 +02:00
test: check that CSV/CLTV are active in rpc_signrawtransaction
Without this check, the tests would also pass if the CSV and CLTV activation heights are not reached yet (e.g. if the .generate() calls before are removed), as the operations OP_CSV and OP_CLTV simply behave as NOPs. Also fixes a comment in the sub-test `test_signing_with_cltv()`.
This commit is contained in:
@ -271,6 +271,7 @@ class SignRawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# Make sure CSV is active
|
||||
self.nodes[0].generate(500)
|
||||
assert self.nodes[0].getblockchaininfo()['softforks']['csv']['active']
|
||||
|
||||
# Create a P2WSH script with CSV
|
||||
script = CScript([1, OP_CHECKSEQUENCEVERIFY, OP_DROP])
|
||||
@ -304,8 +305,9 @@ class SignRawTransactionsTest(BitcoinTestFramework):
|
||||
self.nodes[0].walletpassphrase("password", 9999)
|
||||
getcontext().prec = 8
|
||||
|
||||
# Make sure CSV is active
|
||||
# Make sure CLTV is active
|
||||
self.nodes[0].generate(1500)
|
||||
assert self.nodes[0].getblockchaininfo()['softforks']['bip65']['active']
|
||||
|
||||
# Create a P2WSH script with CLTV
|
||||
script = CScript([1000, OP_CHECKLOCKTIMEVERIFY, OP_DROP])
|
||||
|
Reference in New Issue
Block a user