diff options
| author | Gregory Maxwell <[email protected]> | 2013-08-28 11:20:09 -0700 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2013-08-28 11:20:09 -0700 |
| commit | 1ef0067eab27b9101641b28acc177038e3dae11d (patch) | |
| tree | 5115dbf26fe82b3e1a2567e2ead8ca74339ed5cf /src/qt | |
| parent | Merge pull request #2928 from jgarzik/cnb-txout (diff) | |
| parent | Remove fAllowReuse from GetKeyFromPool. (diff) | |
| download | discoin-1ef0067eab27b9101641b28acc177038e3dae11d.tar.xz discoin-1ef0067eab27b9101641b28acc177038e3dae11d.zip | |
Merge pull request #2904 from gmaxwell/newaddr-no-passphrase
[QT] Don't ask for a passphrase to getnewaddress.
Diffstat (limited to 'src/qt')
| -rw-r--r-- | src/qt/addresstablemodel.cpp | 23 | ||||
| -rw-r--r-- | src/qt/paymentserver.cpp | 2 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index dcc70222c..03517c657 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -355,18 +355,21 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con else if(type == Receive) { // Generate a new address to associate with given label - WalletModel::UnlockContext ctx(walletModel->requestUnlock()); - if(!ctx.isValid()) - { - // Unlock wallet failed or was cancelled - editStatus = WALLET_UNLOCK_FAILURE; - return QString(); - } CPubKey newKey; - if(!wallet->GetKeyFromPool(newKey, true)) + if(!wallet->GetKeyFromPool(newKey)) { - editStatus = KEY_GENERATION_FAILURE; - return QString(); + WalletModel::UnlockContext ctx(walletModel->requestUnlock()); + if(!ctx.isValid()) + { + // Unlock wallet failed or was cancelled + editStatus = WALLET_UNLOCK_FAILURE; + return QString(); + } + if(!wallet->GetKeyFromPool(newKey)) + { + editStatus = KEY_GENERATION_FAILURE; + return QString(); + } } strAddress = CBitcoinAddress(newKey.GetID()).ToString(); } diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index a9f71315a..ff3c2a098 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -531,7 +531,7 @@ PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipient, QB } else { CPubKey newKey; - if (wallet->GetKeyFromPool(newKey, false)) { + if (wallet->GetKeyFromPool(newKey)) { CKeyID keyID = newKey.GetID(); wallet->SetAddressBook(keyID, strAccount, "refund"); |