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

This commit is contained in:
Jonas Schnelli
2016-12-06 13:45:56 +01:00
committed by lateminer
parent c1a0128033
commit aefae306e5

View File

@@ -2656,7 +2656,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());
}