Skip to content

Commit 9d89209

Browse files
committed
policy: stop 3rd party wtxid malleability of anchor spend
1 parent b60aaf8 commit 9d89209

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/policy/policy.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
225225
// get the scriptPubKey corresponding to this input:
226226
CScript prevScript = prev.scriptPubKey;
227227

228+
// witness stuffing detected
229+
if (prevScript.IsPayToAnchor()) {
230+
return false;
231+
}
232+
228233
bool p2sh = false;
229234
if (prevScript.IsPayToScriptHash()) {
230235
std::vector <std::vector<unsigned char> > stack;

0 commit comments

Comments
 (0)