Skip to content

Commit 31fdc54

Browse files
committed
test: speed up wallet_fundrawtransaction.py and wallet_sendall.py
1 parent 6061eb6 commit 31fdc54

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/functional/wallet_fundrawtransaction.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,8 @@ def test_transaction_too_large(self):
983983
# are selected, the transaction will end up being too large, so it
984984
# shouldn't use BnB and instead fall back to Knapsack but that behavior
985985
# is not implemented yet. For now we just check that we get an error.
986+
# First, force the wallet to bulk-generate the addresses we'll need.
987+
recipient.keypoolrefill(1500)
986988
for _ in range(1500):
987989
outputs[recipient.getnewaddress()] = 0.1
988990
wallet.sendmany("", outputs)

test/functional/wallet_sendall.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ def sendall_watchonly_specific_inputs(self):
320320
# This tests needs to be the last one otherwise @cleanup will fail with "Transaction too large" error
321321
def sendall_fails_with_transaction_too_large(self):
322322
self.log.info("Test that sendall fails if resulting transaction is too large")
323+
324+
# Force the wallet to bulk-generate the addresses we'll need
325+
self.wallet.keypoolrefill(1600)
326+
323327
# create many inputs
324328
outputs = {self.wallet.getnewaddress(): 0.000025 for _ in range(1600)}
325329
self.def_wallet.sendmany(amounts=outputs)

0 commit comments

Comments
 (0)