From 811fb41646b0b4cbe17fa3dac07948b58dd23fed Mon Sep 17 00:00:00 2001 From: furszy Date: Thu, 5 Dec 2019 01:07:31 -0300 Subject: [PATCH] [Wallet] GetAvailableP2CSCoins permitting unconfirmed tx. --- src/wallet/wallet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 652f8dea7881f..8a6c077b76a68 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1924,7 +1924,10 @@ void CWallet::GetAvailableP2CSCoins(std::vector& vCoins) const { const uint256& wtxid = it.first; const CWalletTx* pcoin = &it.second; - if (!pcoin->IsTrusted()) + bool fConflicted; + int nDepth = pcoin->GetDepthAndMempool(fConflicted); + + if (fConflicted || nDepth < 0) continue; if (pcoin->HasP2CSOutputs()) {