Skip to content

Commit

Permalink
[Wallet] Bugfix: FRT: don't terminate when keypool is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli committed Dec 6, 2016
1 parent 919db03 commit c24a4f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit c24a4f5

Please sign in to comment.