diff options
author | kdmukai <kdmukai@gmail.com> | 2022-12-16 20:13:59 -0600 |
---|---|---|
committer | kdmukai <kdmukai@gmail.com> | 2022-12-19 11:12:40 -0600 |
commit | 31fdc54dba92fe9d7d8289f1e4380082838a74a9 (patch) | |
tree | 55824dafad2e5df36cc4b403de644515679eb33f | |
parent | 6061eb6564105ad54703a7cf3282590d0e1a7f28 (diff) |
test: speed up wallet_fundrawtransaction.py and wallet_sendall.py
-rwxr-xr-x | test/functional/wallet_fundrawtransaction.py | 2 | ||||
-rwxr-xr-x | test/functional/wallet_sendall.py | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/wallet_fundrawtransaction.py b/test/functional/wallet_fundrawtransaction.py index bf218bfee9..915640dc4e 100755 --- a/test/functional/wallet_fundrawtransaction.py +++ b/test/functional/wallet_fundrawtransaction.py @@ -983,6 +983,8 @@ class RawTransactionsTest(BitcoinTestFramework): # are selected, the transaction will end up being too large, so it # shouldn't use BnB and instead fall back to Knapsack but that behavior # is not implemented yet. For now we just check that we get an error. + # First, force the wallet to bulk-generate the addresses we'll need. + recipient.keypoolrefill(1500) for _ in range(1500): outputs[recipient.getnewaddress()] = 0.1 wallet.sendmany("", outputs) diff --git a/test/functional/wallet_sendall.py b/test/functional/wallet_sendall.py index 2221c39588..778c8a5b9e 100755 --- a/test/functional/wallet_sendall.py +++ b/test/functional/wallet_sendall.py @@ -320,6 +320,10 @@ class SendallTest(BitcoinTestFramework): # This tests needs to be the last one otherwise @cleanup will fail with "Transaction too large" error def sendall_fails_with_transaction_too_large(self): self.log.info("Test that sendall fails if resulting transaction is too large") + + # Force the wallet to bulk-generate the addresses we'll need + self.wallet.keypoolrefill(1600) + # create many inputs outputs = {self.wallet.getnewaddress(): 0.000025 for _ in range(1600)} self.def_wallet.sendmany(amounts=outputs) |