mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 21:12:29 +02:00
Make IsTrusted scan parents recursively
This commit is contained in:
parent
a22b62481a
commit
dce032ce29
@ -2319,8 +2319,12 @@ bool CWalletTx::IsTrusted(interfaces::Chain::Lock& locked_chain) const
|
||||
if (parent == nullptr)
|
||||
return false;
|
||||
const CTxOut& parentOut = parent->tx->vout[txin.prevout.n];
|
||||
// Check that this specific input being spent is trusted
|
||||
if (pwallet->IsMine(parentOut) != ISMINE_SPENDABLE)
|
||||
return false;
|
||||
// Recurse to check that the parent is also trusted
|
||||
if (!parent->IsTrusted(locked_chain))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user