diff options
| author | Gavin Andresen <[email protected]> | 2011-08-12 16:32:07 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-09-01 10:12:59 -0400 |
| commit | 7db3b75b3e38c2088596f49cb51fe1c9c7e8b433 (patch) | |
| tree | 9484ca192506ab645ca1764d5993bd6ddce88b44 /src/ui.cpp | |
| parent | Merge pull request #470 from fabianhjr/master (diff) | |
| download | discoin-7db3b75b3e38c2088596f49cb51fe1c9c7e8b433.tar.xz discoin-7db3b75b3e38c2088596f49cb51fe1c9c7e8b433.zip | |
Logic running with -keypool=0 was wrong (empty keys were being returned). Fixes #445
Renames GetOrReuseKeyFromKeyPool to GetKeyFromPool, with fAllowReuse arg and bool result.
Diffstat (limited to 'src/ui.cpp')
| -rw-r--r-- | src/ui.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui.cpp b/src/ui.cpp index 5ca666192..c820cf7df 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -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(); |