aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-12-06 13:45:56 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2016-12-06 13:45:56 +0100
commitc24a4f5981d47d55aa9e4eb40294832a4d38fb80 (patch)
tree49e95b564c108f15a272db2619bb0a49a839e647 /src
parent919db037f1f5cc73cdcaef92dd9cb0e7f5c8dec3 (diff)
[Wallet] Bugfix: FRT: don't terminate when keypool is empty
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 638fca9917..00e97d3c7f 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -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());
}