aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-12-06 13:45:56 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-12-14 12:58:45 +0100
commit43bcfca48970b65d4eb215f20047bb99495f3727 (patch)
tree67b0caf1e377917417297605af37cd3a7a8429fc /src/wallet
parent0cc07f82f0d4043e93d8cea49356cd2bc5ffcb27 (diff)
[Wallet] Bugfix: FRT: don't terminate when keypool is empty
Github-Pull: #9295 Rebased-From: c24a4f5981d47d55aa9e4eb40294832a4d38fb80
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 6ce8d19bfb..5b35e49a0f 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2290,7 +2290,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());
}