aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
authorPeter Todd <pete@petertodd.org>2014-03-10 17:31:46 -0400
committerPeter Todd <pete@petertodd.org>2014-05-05 05:35:27 -0400
commit68f7d1d7af39a8ea6510f888e8e058e8e8faa007 (patch)
treeabde758379143e5fb5df4c8fbc9dc83678c4d447 /src/script.h
parentd4ffe4e425b5a3f6fe4ff0ce7297608dfe6c7417 (diff)
Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/script.h b/src/script.h
index 657ac0b388..0f26fb556d 100644
--- a/src/script.h
+++ b/src/script.h
@@ -44,6 +44,18 @@ enum
SCRIPT_VERIFY_NOCACHE = (1U << 3), // do not store results in signature cache (but do query it)
};
+// Mandatory script verification flags that all new blocks must comply with for
+// them to be valid. (but old blocks may not comply with) Currently just P2SH,
+// but in the future other flags may be added, such as a soft-fork to enforce
+// strict DER encoding.
+static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
+
+// Standard script verification flags that standard transactions will comply
+// with. However scripts violating these flags may still be present in valid
+// blocks and we must accept those blocks.
+static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
+ SCRIPT_VERIFY_STRICTENC;
+
enum txnouttype
{
TX_NONSTANDARD,