diff options
author | Greg Sanders <gsanders87@gmail.com> | 2023-11-03 09:21:48 -0400 |
---|---|---|
committer | Greg Sanders <gsanders87@gmail.com> | 2024-07-30 14:06:58 -0400 |
commit | 9d892099378b2ad5f52220403bdeae43c61d6955 (patch) | |
tree | 868b8111278384d2ea24a31cf84a891e4e5d94a9 /src/policy | |
parent | b60aaf8b239978947d2b0e3f56e7d8a4092d7570 (diff) |
policy: stop 3rd party wtxid malleability of anchor spend
Diffstat (limited to 'src/policy')
-rw-r--r-- | src/policy/policy.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index e84a8428bf..68d879b5b8 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -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; |