mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
policy: stop 3rd party wtxid malleability of anchor spend
This commit is contained in:
parent
b60aaf8b23
commit
9d89209937
1 changed files with 5 additions and 0 deletions
|
@ -225,6 +225,11 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
|
||||||
// get the scriptPubKey corresponding to this input:
|
// get the scriptPubKey corresponding to this input:
|
||||||
CScript prevScript = prev.scriptPubKey;
|
CScript prevScript = prev.scriptPubKey;
|
||||||
|
|
||||||
|
// witness stuffing detected
|
||||||
|
if (prevScript.IsPayToAnchor()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool p2sh = false;
|
bool p2sh = false;
|
||||||
if (prevScript.IsPayToScriptHash()) {
|
if (prevScript.IsPayToScriptHash()) {
|
||||||
std::vector <std::vector<unsigned char> > stack;
|
std::vector <std::vector<unsigned char> > stack;
|
||||||
|
|
Loading…
Add table
Reference in a new issue