Permalink
Browse files

[Wallet] Bugfix: FRT: don't terminate when keypool is empty

Github-Pull: #9295
Rebased-From: c24a4f5
  • Loading branch information...
1 parent 8dee97f commit d6098956c34719cd833a645b21d3d8f1be0a9d17 @jonasschnelli jonasschnelli committed with MarcoFalke Dec 6, 2016
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/wallet/wallet.cpp
View
@@ -2104,7 +2104,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());
}

0 comments on commit d609895

Please sign in to comment.