diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-11-20 15:23:05 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-11-20 15:27:39 +0100 |
commit | 3ba5ebc065ce9fceba8f9de7579debc5b49c3ba8 (patch) | |
tree | 0e5d1d4782c4405ff5d7a9cb806853e5428a1f1b /src/script/interpreter.h | |
parent | cf9c4887f176634c9f39305ad70657d9fff3962d (diff) | |
parent | 03914234b3c9c35d66b51d580fe727a0707394ca (diff) |
Merge pull request #5000
0391423 Discourage NOPs reserved for soft-fork upgrades (Peter Todd)
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r-- | src/script/interpreter.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 14cccc558f..12b2719414 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -57,7 +57,18 @@ enum // any other push causes the script to fail (BIP62 rule 3). // In addition, whenever a stack element is interpreted as a number, it must be of minimal length (BIP62 rule 4). // (softfork safe) - SCRIPT_VERIFY_MINIMALDATA = (1U << 6) + SCRIPT_VERIFY_MINIMALDATA = (1U << 6), + + // Discourage use of NOPs reserved for upgrades (NOP1-10) + // + // Provided so that nodes can avoid accepting or mining transactions + // containing executed NOP's whose meaning may change after a soft-fork, + // thus rendering the script invalid; with this flag set executing + // discouraged NOPs fails the script. This verification flag will never be + // a mandatory flag applied to scripts in a block. NOPs that are not + // executed, e.g. within an unexecuted IF ENDIF block, are *not* rejected. + SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS = (1U << 7) + }; uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType); |