aboutsummaryrefslogtreecommitdiff
path: root/test/functional/keypool.py
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-01-17 08:55:30 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2017-03-24 10:28:39 +0100
commit79df9df3482d71391dee1dd59054aed8f7bbfa6b (patch)
tree6fcfc3d7002941d921faf4ee5c4c0440e1fcce46 /test/functional/keypool.py
parentbcafca1077cf789ba79d16501a8cbb5d692bf8e6 (diff)
Switch to 100% for the HD internal keypool size
Diffstat (limited to 'test/functional/keypool.py')
-rwxr-xr-xtest/functional/keypool.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/keypool.py b/test/functional/keypool.py
index 26585fc4ad..cb9ab688d1 100755
--- a/test/functional/keypool.py
+++ b/test/functional/keypool.py
@@ -29,17 +29,21 @@ class KeyPoolTest(BitcoinTestFramework):
assert(addr_data['hdmasterkeyid'] == wallet_info['hdmasterkeyid'])
assert_raises_jsonrpc(-12, "Error: Keypool ran out, please call keypoolrefill first", nodes[0].getnewaddress)
- # put six (plus 2) new keys in the keypool (100% external-, +20% internal-keys, 2 in min)
+ # put six (plus 2) new keys in the keypool (100% external-, +100% internal-keys, 1 in min)
nodes[0].walletpassphrase('test', 12000)
nodes[0].keypoolrefill(6)
nodes[0].walletlock()
wi = nodes[0].getwalletinfo()
- assert_equal(wi['keypoolsize_hd_internal'], 2)
+ assert_equal(wi['keypoolsize_hd_internal'], 6)
assert_equal(wi['keypoolsize'], 6)
# drain the internal keys
nodes[0].getrawchangeaddress()
nodes[0].getrawchangeaddress()
+ nodes[0].getrawchangeaddress()
+ nodes[0].getrawchangeaddress()
+ nodes[0].getrawchangeaddress()
+ nodes[0].getrawchangeaddress()
addr = set()
# the next one should fail
assert_raises_jsonrpc(-12, "Keypool ran out", nodes[0].getrawchangeaddress)
@@ -72,7 +76,7 @@ class KeyPoolTest(BitcoinTestFramework):
nodes[0].walletpassphrase('test', 100)
nodes[0].keypoolrefill(100)
wi = nodes[0].getwalletinfo()
- assert_equal(wi['keypoolsize_hd_internal'], 20)
+ assert_equal(wi['keypoolsize_hd_internal'], 100)
assert_equal(wi['keypoolsize'], 100)
def __init__(self):