aboutsummaryrefslogtreecommitdiff
path: root/src/script/script_error.h
diff options
context:
space:
mode:
authorJohnson Lau <jl2012@xbt.hk>2018-04-27 03:56:29 +0800
committerMarcoFalke <falke.marco@gmail.com>2018-05-24 14:03:01 -0400
commitd353dd121be0bf2a525e4bbea2b4ada2954d2b15 (patch)
tree28bf8bba835570ecd1080ff221360dfea40b1347 /src/script/script_error.h
parentd6c3a08c482225b3742c9145a9cbfe60567f0c4f (diff)
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. Github-Pull: #11423 Rebased-From: 9dabfe49c066301ef75bcfcb089fd308366127c4
Diffstat (limited to 'src/script/script_error.h')
-rw-r--r--src/script/script_error.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/script_error.h b/src/script/script_error.h
index 3200e94707..6982a087f4 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;