From c69a47dd6192057f2ac5a3cd9b3134141c966a59 Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 6 Apr 2023 13:05:20 -0400 Subject: [PATCH] Remove dead code relating to interest --- src/wallet/wallet.cpp | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 36a907df5..e19152f38 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3303,7 +3303,7 @@ CAmount CWallet::GetImmatureWatchOnlyBalance() const void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl, bool fIncludeZeroValue, bool fIncludeCoinBase) const { - uint64_t interest,*ptr; + uint64_t *ptr; vCoins.clear(); { @@ -3336,34 +3336,8 @@ void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const !IsLockedCoin((*it).first, i) && (pcoin->vout[i].nValue > 0 || fIncludeZeroValue) && (!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i))) { - if ( 1 ) { - uint32_t locktime; int32_t txheight; CBlockIndex *tipindex; - if ( SMART_CHAIN_SYMBOL[0] == 0 && chainActive.LastTip() != 0 && chainActive.LastTip()->GetHeight() >= 60000 ) - { - if ( pcoin->vout[i].nValue >= 10*COIN ) - { - if ( (tipindex= chainActive.LastTip()) != 0 ) - { - interest = 0; - } else interest = 0; - if ( interest != 0 ) - { - ptr = (uint64_t *)&pcoin->vout[i].interest; - (*ptr) = interest; - //pcoin->vout[i].nValue += interest; - } else { - ptr = (uint64_t *)&pcoin->vout[i].interest; - (*ptr) = 0; - } - } else { - ptr = (uint64_t *)&pcoin->vout[i].interest; - (*ptr) = 0; - } - } else { - ptr = (uint64_t *)&pcoin->vout[i].interest; - (*ptr) = 0; - } - } + ptr = (uint64_t *)&pcoin->vout[i].interest; + (*ptr) = 0; vCoins.push_back(COutput(pcoin, i, nDepth, (mine & ISMINE_SPENDABLE) != ISMINE_NO)); } }