mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Logic running with -keypool=0 was wrong (empty keys were being returned). Fixes #445
Renames GetOrReuseKeyFromKeyPool to GetKeyFromPool, with fAllowReuse arg and bool result.
This commit is contained in:
parent
f662cefd85
commit
7db3b75b3e
5 changed files with 42 additions and 25 deletions
|
|
@ -1391,7 +1391,9 @@ void CMainFrame::OnButtonNew(wxCommandEvent& event)
|
|||
return;
|
||||
|
||||
// Generate new key
|
||||
strAddress = CBitcoinAddress(pwalletMain->GetOrReuseKeyFromPool()).ToString();
|
||||
std::vector<unsigned char> newKey;
|
||||
pwalletMain->GetKeyFromPool(newKey, true);
|
||||
strAddress = CBitcoinAddress(newKey).ToString();
|
||||
|
||||
if (fWasLocked)
|
||||
pwalletMain->Lock();
|
||||
|
|
@ -2826,7 +2828,9 @@ void CAddressBookDialog::OnButtonNew(wxCommandEvent& event)
|
|||
return;
|
||||
|
||||
// Generate new key
|
||||
strAddress = CBitcoinAddress(pwalletMain->GetOrReuseKeyFromPool()).ToString();
|
||||
std::vector<unsigned char> newKey;
|
||||
pwalletMain->GetKeyFromPool(newKey, true);
|
||||
strAddress = CBitcoinAddress(newKey).ToString();
|
||||
|
||||
if (fWasLocked)
|
||||
pwalletMain->Lock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue