diff options
| author | Johnson Lau <[email protected]> | 2018-04-27 03:56:29 +0800 |
|---|---|---|
| committer | Johnson Lau <[email protected]> | 2018-05-05 04:26:12 +0800 |
| commit | 9dabfe49c066301ef75bcfcb089fd308366127c4 (patch) | |
| tree | 9640b1303dc21c3dc68463833d9f34145a118b2e /src/script/script_error.h | |
| parent | Merge #13165: doc: Mention good first issue list in CONTRIBUTING.md (diff) | |
| download | discoin-9dabfe49c066301ef75bcfcb089fd308366127c4.tar.xz discoin-9dabfe49c066301ef75bcfcb089fd308366127c4.zip | |
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.
Diffstat (limited to 'src/script/script_error.h')
| -rw-r--r-- | src/script/script_error.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/script_error.h b/src/script/script_error.h index 3200e9470..6982a087f 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -64,6 +64,10 @@ typedef enum ScriptError_t SCRIPT_ERR_WITNESS_UNEXPECTED, SCRIPT_ERR_WITNESS_PUBKEYTYPE, + /* Constant scriptCode */ + SCRIPT_ERR_OP_CODESEPARATOR, + SCRIPT_ERR_SIG_FINDANDDELETE, + SCRIPT_ERR_ERROR_COUNT } ScriptError; |