Skip to content

Commit e3237b1

Browse files
committed
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()`.
1 parent 1488f55 commit e3237b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/rpc_signrawtransaction.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ def test_signing_with_csv(self):
271271

272272
# Make sure CSV is active
273273
self.nodes[0].generate(500)
274+
assert self.nodes[0].getblockchaininfo()['softforks']['csv']['active']
274275

275276
# Create a P2WSH script with CSV
276277
script = CScript([1, OP_CHECKSEQUENCEVERIFY, OP_DROP])
@@ -304,8 +305,9 @@ def test_signing_with_cltv(self):
304305
self.nodes[0].walletpassphrase("password", 9999)
305306
getcontext().prec = 8
306307

307-
# Make sure CSV is active
308+
# Make sure CLTV is active
308309
self.nodes[0].generate(1500)
310+
assert self.nodes[0].getblockchaininfo()['softforks']['bip65']['active']
309311

310312
# Create a P2WSH script with CLTV
311313
script = CScript([1000, OP_CHECKLOCKTIMEVERIFY, OP_DROP])

0 commit comments

Comments
 (0)