diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-12-06 13:45:56 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-12-07 23:48:46 +0100 |
commit | d6098956c34719cd833a645b21d3d8f1be0a9d17 (patch) | |
tree | c6cab5ae1ea5041502b2865f08fe05dd9b147e4c | |
parent | 8dee97f98253c7d7a5219f4ab0d0e6e9bec0dcef (diff) |
[Wallet] Bugfix: FRT: don't terminate when keypool is empty
Github-Pull: #9295
Rebased-From: c24a4f5981d47d55aa9e4eb40294832a4d38fb80
-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 177edbf2db..30717e89b1 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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()); } |