diff options
| author | Pieter Wuille <[email protected]> | 2016-12-09 16:14:48 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-12-09 16:14:54 -0800 |
| commit | 815640ec6af9a38d6a2da4a4400056e2f4105080 (patch) | |
| tree | 582aa4cbf6f7ffd507be728887f2c5538bad919e /src/wallet | |
| parent | Merge #9303: Update comments in ctaes (diff) | |
| parent | [QA] add fundrawtransaction test on a locked wallet with empty keypool (diff) | |
| download | discoin-815640ec6af9a38d6a2da4a4400056e2f4105080.tar.xz discoin-815640ec6af9a38d6a2da4a4400056e2f4105080.zip | |
Merge #9295: [Wallet] Bugfix: Fundrawtransaction: don't terminate when keypool is empty
1a6eacb [QA] add fundrawtransaction test on a locked wallet with empty keypool (Jonas Schnelli)
c24a4f5 [Wallet] Bugfix: FRT: don't terminate when keypool is empty (Jonas Schnelli)
Diffstat (limited to 'src/wallet')
| -rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 638fca991..00e97d3c7 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2389,7 +2389,11 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt CPubKey vchPubKey; bool ret; ret = reservekey.GetReservedKey(vchPubKey); - assert(ret); // should never fail, as we just unlocked + if (!ret) + { + strFailReason = _("Keypool ran out, please call keypoolrefill first"); + return false; + } scriptChange = GetScriptForDestination(vchPubKey.GetID()); } |