From 74830ee2a858139f3574451fe7fb0745a1b446a1 Mon Sep 17 00:00:00 2001 From: Pasta Date: Mon, 17 Jun 2019 20:01:47 -0500 Subject: [PATCH] adjust spork5 code in wallet.cpp Signed-off-by: Pasta --- src/wallet/wallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 27321c076c..527159b388 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2698,8 +2698,9 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMin std::vector vValue; CAmount nTotalLower = 0; - if (fUseInstantSend) { - coinLowestLarger->txout.nValue = sporkManager.GetSporkValue(SPORK_5_INSTANTSEND_MAX_VALUE) * COIN; + // TODO: drop SPORK_5_INSTANTSEND_MAX_VALUE spork + if (fUseInstantSend && nTargetValue > sporkManager.GetSporkValue(SPORK_5_INSTANTSEND_MAX_VALUE) * COIN) { + return false; } random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt);