Skip to content

Commit 2b3d4a5

Browse files
committed
fix: use GetTxDepthInMainChain for CoinJoin depth checks
1 parent 6fa4e86 commit 2b3d4a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/coinjoin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ CAmount CachedTxGetAnonymizedCredit(const CWallet& wallet, const CWalletTx& wtx,
497497
AssertLockHeld(wallet.cs_wallet);
498498

499499
// Exclude coinbase and conflicted txes
500-
if (wtx.IsCoinBase() || wallet.GetTxBlocksToMaturity(wtx) < 0)
500+
if (wtx.IsCoinBase() || wallet.GetTxDepthInMainChain(wtx) < 0)
501501
return 0;
502502

503503
CAmount nCredit = 0;
@@ -533,7 +533,7 @@ CoinJoinCredits CachedTxGetAvailableCoinJoinCredits(const CWallet& wallet, const
533533
if (wtx.IsCoinBase() && wallet.GetTxBlocksToMaturity(wtx) > 0)
534534
return ret;
535535

536-
int nDepth = wallet.GetTxBlocksToMaturity(wtx);
536+
int nDepth = wallet.GetTxDepthInMainChain(wtx);
537537
if (nDepth < 0) return ret;
538538

539539
ret.is_unconfirmed = CachedTxIsTrusted(wallet, wtx) && nDepth == 0;

0 commit comments

Comments
 (0)