Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants

This commit is contained in:
Peter Todd
2014-03-10 17:31:46 -04:00
parent d4ffe4e425
commit 68f7d1d7af
6 changed files with 20 additions and 5 deletions

View File

@@ -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,