Merge pull request #3843
787ee0cCheck redeemScript size does not exceed 520 byte limit (Peter Todd)4d79098Increase IsStandard() scriptSig length (Peter Todd)f80cffaDo not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails (Peter Todd)6380180Add rejection of non-null CHECKMULTISIG dummy values (Peter Todd)29c1749Let tx (in)valid tests use any SCRIPT_VERIFY flag (Peter Todd)68f7d1dCreate (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants (Peter Todd)
This commit is contained in:
20
src/script.h
20
src/script.h
@@ -190,8 +190,28 @@ enum
|
||||
SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
|
||||
SCRIPT_VERIFY_EVEN_S = (1U << 2), // enforce even S values in signatures (depends on STRICTENC)
|
||||
SCRIPT_VERIFY_NOCACHE = (1U << 3), // do not store results in signature cache (but do query it)
|
||||
SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
|
||||
};
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Failing one of these tests may trigger a DoS ban - see CheckInputs() for
|
||||
// details.
|
||||
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 |
|
||||
SCRIPT_VERIFY_NULLDUMMY;
|
||||
|
||||
// For convenience, standard but not mandatory verify flags.
|
||||
static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
|
||||
|
||||
enum txnouttype
|
||||
{
|
||||
TX_NONSTANDARD,
|
||||
|
||||
Reference in New Issue
Block a user