wallet: Avoid dropping confirmed coins

This commit is contained in:
MarcoFalke
2022-01-14 11:51:38 +01:00
parent 888841ea8d
commit fa272eab44
6 changed files with 55 additions and 10 deletions

View File

@@ -279,8 +279,6 @@ bool CachedTxIsFromMe(const CWallet& wallet, const CWalletTx& wtx, const isminef
bool CachedTxIsTrusted(const CWallet& wallet, const CWalletTx& wtx, std::set<uint256>& trusted_parents)
{
AssertLockHeld(wallet.cs_wallet);
// Quick answer in most cases
if (!wallet.chain().checkFinalTx(*wtx.tx)) return false;
int nDepth = wallet.GetTxDepthInMainChain(wtx);
if (nDepth >= 1) return true;
if (nDepth < 0) return false;