Skip to content

Commit 0365b06

Browse files
committed
fix: reset rounds to 0 when tx fee is not 0
1 parent e4b22a6 commit 0365b06

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,13 @@ int CWallet::GetRealOutpointCoinJoinRounds(const COutPoint& outpoint, int nRound
14131413
}
14141414
}
14151415

1416+
// make sure we spent all of it with 0 fee, reset to 0 rounds otherwise
1417+
if (wtx->GetDebit(ISMINE_SPENDABLE) != wtx->GetCredit(ISMINE_SPENDABLE)) {
1418+
*nRoundsRef = 0;
1419+
WalletCJLogPrint((*this), "%s UPDATED %-70s %3d\n", __func__, outpoint.ToStringShort(), *nRoundsRef);
1420+
return *nRoundsRef;
1421+
}
1422+
14161423
int nShortest = -10; // an initial value, should be no way to get this by calculations
14171424
bool fDenomFound = false;
14181425
// only denoms here so let's look up

0 commit comments

Comments
 (0)