mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Add constant scriptCode policy in non-segwit scripts
This disables OP_CODESEPARATOR in non-segwit scripts (even in an unexecuted branch), and makes a positive FindAndDelete result invalid. This ensures that the scriptCode serialized in SignatureHash() is always the same as the script passing to the EvalScript.
This commit is contained in:
parent
627c3762ce
commit
9dabfe49c0
6 changed files with 29 additions and 3 deletions
|
|
@ -97,6 +97,8 @@ static ScriptErrorDesc script_errors[]={
|
|||
{SCRIPT_ERR_WITNESS_MALLEATED_P2SH, "WITNESS_MALLEATED_P2SH"},
|
||||
{SCRIPT_ERR_WITNESS_UNEXPECTED, "WITNESS_UNEXPECTED"},
|
||||
{SCRIPT_ERR_WITNESS_PUBKEYTYPE, "WITNESS_PUBKEYTYPE"},
|
||||
{SCRIPT_ERR_OP_CODESEPARATOR, "OP_CODESEPARATOR"},
|
||||
{SCRIPT_ERR_SIG_FINDANDDELETE, "SIG_FINDANDDELETE"},
|
||||
};
|
||||
|
||||
const char *FormatScriptError(ScriptError_t err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue