Skip to content

Commit 9ef8c53

Browse files
committed
test: drop extra generates from wallet_signrawtransactionwithwallet
bitcoin#22550 adds assertions to validate CSV/CLTV activation and replaces the `generate()` calls with a helper `generate_to_height()` but bitcoin#22818 activates all forks from block 1 by default, so the `generate_to_height()` calls have been dropped. This leaves us with the `generate()` calls being swapped for assertions.
1 parent b82450a commit 9ef8c53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/functional/wallet_signrawtransactionwithwallet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_signing_with_csv(self):
130130
getcontext().prec = 8
131131

132132
# Make sure CSV is active
133-
self.generate(self.nodes[0], 500)
133+
assert self.nodes[0].getblockchaininfo()['softforks']['csv']['active']
134134

135135
# Create a P2SH script with CSV
136136
script = CScript([1, OP_CHECKSEQUENCEVERIFY, OP_DROP, OP_TRUE])
@@ -159,11 +159,11 @@ def test_signing_with_cltv(self):
159159
self.nodes[0].walletpassphrase("password", 9999)
160160
getcontext().prec = 8
161161

162-
# Make sure CSV is active
163-
self.generate(self.nodes[0], 1500)
162+
# Make sure CLTV is active
163+
assert self.nodes[0].getblockchaininfo()['softforks']['bip65']['active']
164164

165165
# Create a P2SH script with CLTV
166-
script = CScript([1000, OP_CHECKLOCKTIMEVERIFY, OP_DROP, OP_TRUE])
166+
script = CScript([100, OP_CHECKLOCKTIMEVERIFY, OP_DROP, OP_TRUE])
167167
address = script_to_p2sh(script)
168168

169169
# Fund that address and make the spend

0 commit comments

Comments
 (0)