diff options
| author | Gavin Andresen <[email protected]> | 2011-09-01 12:01:29 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-09-01 12:01:29 -0700 |
| commit | 783c636c73182731ca12e6af67516767a989da66 (patch) | |
| tree | 6e160958804c3f0b968a295b3bec7d2ed947b220 /src/ui.cpp | |
| parent | Merge branch 'code-cleanup' of git://github.com/muggenhor/bitcoin (diff) | |
| parent | obtain cs_wallet mutex to protect vchDefaultKey (diff) | |
| download | discoin-783c636c73182731ca12e6af67516767a989da66.tar.xz discoin-783c636c73182731ca12e6af67516767a989da66.zip | |
Merge pull request #467 from gavinandresen/keypoolzero
Logic running with -keypool=0 was wrong (empty keys were being returned).
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(); |