From 4e87259af29c5f9066fba8ad6456ec10fff6140e Mon Sep 17 00:00:00 2001 From: CryptAxe Date: Tue, 30 Apr 2024 19:58:07 -0700 Subject: [PATCH] Skip checking drivechain outputs in AvailableCoins * Skip drivechain outputs in CWallet::AvailableCoins --- src/wallet/wallet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 20fd5531f..9b5d595b1 100755 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2402,6 +2402,11 @@ void CWallet::AvailableCoins(std::vector &vCoins, bool fOnlySafe, const continue; for (unsigned int i = 0; i < pcoin->tx->vout.size(); i++) { + // Skip Drivechain CTIP outputs + uint8_t nSidechain = 0; + if (pcoin->tx->vout[i].scriptPubKey.IsDrivechain(nSidechain)) + continue; + if (pcoin->tx->vout[i].nValue < nMinimumAmount || pcoin->tx->vout[i].nValue > nMaximumAmount) continue;