-
Notifications
You must be signed in to change notification settings - Fork 35.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPC: keypoolrefill now permits optional size parameter, to bump keypool #2776
Conversation
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/7c1bb9a13226e7b46cc6836099809607ade8365a for binaries and test log. |
@@ -49,6 +49,7 @@ | |||
bool fTxIndex = false; | |||
unsigned int nCoinCacheSize = 5000; | |||
bool fHaveGUI = false; | |||
unsigned int nKeyPoolTarget = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable should be in CWallet, IMHO; certainly not a global in main.
Actually, why is this variable even necessary at all? Have CWallet::TopupKeyPool take an int size as argument, and pass GetArg("-keypool") to it, or where necessary an overridable value.
Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
Updated per @sipa suggestion. |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/36bd46f1c4330fa57a3730bd80706eca11510b55 for binaries and test log. |
RPC: keypoolrefill now permits optional size parameter, to bump keypool
* Unify autoIS/send_smth functions * Rename autoix-mempool.py -> autois-mempool.py * Make sure create_raw_trx produces expected results * Make sure sender has enough inputs and nodes are synced before starting the actual test * Mine one block to clean mempool up * 2 blocks is enough for IS on regtest This also unifies it across different IS tests * Allow wait_for_instantlock to be called on any node, not only on the one that has the tx in the wallet * No need to query for tx this often in wait_for_instantlock * Rename create_raw_trx -> create_raw_tx * Fund sender with a single TX instead of 30
Users are now permitted to increase the keypool size at runtime.
Ideally they will update their config and restart, but that is not always feasible. This enables the admin to login, refill the keypool to handle heavy traffic needs immediately, without downtime.
However, the keypool target size returns to its configuration-specified value at restart, as expected.