policy: stop 3rd party wtxid malleability of anchor spend

This commit is contained in:
Greg Sanders committed 2024-07-30 14:06:58 -04:00
1 parent b60aaf8b23
commit 9d89209937
1 file changed
+5
+5
View File
@@ -225,6 +225,11 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
// get the scriptPubKey corresponding to this input:
CScript prevScript = prev.scriptPubKey;
// witness stuffing detected
if (prevScript.IsPayToAnchor()) {
return false;
}
bool p2sh = false;
if (prevScript.IsPayToScriptHash()) {
std::vector <std::vector<unsigned char> > stack;