aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_keypool.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-10-12 00:04:06 +0900
committerJohn Newbery <john@johnnewbery.com>2018-10-16 11:27:13 -0400
commitc269209336dfa7e4258cfe7d5b0a3bc07b0da3b2 (patch)
treef400f7e5cd4ff186a82cae17a7833a209775fe1b /test/functional/wallet_keypool.py
parentbe992701b018f256db6d64786624be4cb60d8975 (diff)
downloadbitcoin-c269209336dfa7e4258cfe7d5b0a3bc07b0da3b2.tar.xz
[tests] Small fixups before deprecating generate
In advance of deprecating the generate RPC method, make some small changes to a small number of inidividual test cases: - make memory checking less prescriptive in wallet_basic.py - replace calls to generate with generatetoaddress in wallet_keypool.py - replace calls to generate with generatetoaddress and fixup label issues in wallet_labels.py - replace calls to generate with generatetoaddress in wallet_multiwallet.py
Diffstat (limited to 'test/functional/wallet_keypool.py')
-rwxr-xr-xtest/functional/wallet_keypool.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py
index 51afa0cb1a..ceb9709712 100755
--- a/test/functional/wallet_keypool.py
+++ b/test/functional/wallet_keypool.py
@@ -73,11 +73,10 @@ class KeyPoolTest(BitcoinTestFramework):
time.sleep(1.1)
assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0)
- # drain them by mining
- nodes[0].generate(1)
- nodes[0].generate(1)
- nodes[0].generate(1)
- assert_raises_rpc_error(-12, "Keypool ran out", nodes[0].generate, 1)
+ # drain the keypool
+ for _ in range(3):
+ nodes[0].getnewaddress()
+ assert_raises_rpc_error(-12, "Keypool ran out", nodes[0].getnewaddress)
nodes[0].walletpassphrase('test', 100)
nodes[0].keypoolrefill(100)