Make IsTrusted scan parents recursively

This commit is contained in:
Jeremy Rubin committed 2019-10-21 13:16:22 -07:00
1 parent a22b62481a
commit dce032ce29
1 file changed
+4
+4
View File
@@ -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;
}