aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-07-25 23:42:27 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-07-25 23:44:29 +0200
commite3237b1cd07a5099fbb0108218194eb653b6a9f3 (patch)
tree3cf1a13e12eb99176f75fec950e9cf495ecd19a1 /test
parent1488f55fa57a1400a57be837b574183f019c7855 (diff)
downloadbitcoin-e3237b1cd07a5099fbb0108218194eb653b6a9f3.tar.xz
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()`.
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_signrawtransaction.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/rpc_signrawtransaction.py b/test/functional/rpc_signrawtransaction.py
index f3627d1e37..71933fe1ba 100755
--- a/test/functional/rpc_signrawtransaction.py
+++ b/test/functional/rpc_signrawtransaction.py
@@ -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])