Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
According to the help manual the parameter is newsize
and keypoolrefill
fills the keypool to newsize
. This was the behavior up to at least v21 of bitcoind. In v24 of bitcoind these semantics have changed. Related to https://github.com/bitcoin-s/bitcoin-s/pull/5496
0$ bitcoin-cli -regtest getwalletinfo
1{
2 "walletname": "",
3 "walletversion": 169900,
4 "format": "sqlite",
5 "balance": 50.00000000,
6 "unconfirmed_balance": 0.00000000,
7 "immature_balance": 3675.00000000,
8 "txcount": 101,
9 "keypoolsize": 4000,
10 "keypoolsize_hd_internal": 4000,
11 "paytxfee": 0.00000000,
12 "private_keys_enabled": true,
13 "avoid_reuse": false,
14 "scanning": false,
15 "descriptors": true,
16 "external_signer": false
17}
So I have a keypool of size 4,000
0$ bitcoin-cli -regtest keypoolrefill 4001
Somehow I end up with a keypool size of 16,004?
0$ bitcoin-cli -regtest getwalletinfo
1{
2 "walletname": "",
3 "walletversion": 169900,
4 "format": "sqlite",
5 "balance": 50.00000000,
6 "unconfirmed_balance": 0.00000000,
7 "immature_balance": 3675.00000000,
8 "txcount": 101,
9 "keypoolsize": 16004,
10 "keypoolsize_hd_internal": 16004,
11 "paytxfee": 0.00000000,
12 "private_keys_enabled": true,
13 "avoid_reuse": false,
14 "scanning": false,
15 "descriptors": true,
16 "external_signer": false
17}
Expected behaviour
I would expect keypoolrefill
to fill up the keypool to the given parameter.
Steps to reproduce
Run commands given in the issue
Relevant log output
No response
How did you obtain Bitcoin Core
Pre-built binaries
What version of Bitcoin Core are you using?
Bitcoin Core version v24.2.0
Operating system and version
Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103 arm64
Machine specifications
No response