aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-12-06 13:45:56 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-12-07 23:48:46 +0100
commitd6098956c34719cd833a645b21d3d8f1be0a9d17 (patch)
treec6cab5ae1ea5041502b2865f08fe05dd9b147e4c /src
parent8dee97f98253c7d7a5219f4ab0d0e6e9bec0dcef (diff)
downloadbitcoin-d6098956c34719cd833a645b21d3d8f1be0a9d17.tar.xz
[Wallet] Bugfix: FRT: don't terminate when keypool is empty
Github-Pull: #9295 Rebased-From: c24a4f5981d47d55aa9e4eb40294832a4d38fb80
Diffstat (limited to 'src')
-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 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());
}