Changeset View
Changeset View
Standalone View
Standalone View
src/script/bitcoinconsensus.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
/** Script verification flags */ | /** Script verification flags */ | ||||
enum { | enum { | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, | ||||
// evaluate P2SH (BIP16) subscripts | // evaluate P2SH (BIP16) subscripts | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), | ||||
// enforce strict DER (BIP66) compliance | // enforce strict DER (BIP66) compliance | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), | ||||
// enforce NULLDUMMY (BIP147) | |||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY = (1U << 4), | |||||
// enable CHECKLOCKTIMEVERIFY (BIP65) | // enable CHECKLOCKTIMEVERIFY (BIP65) | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), | ||||
// enable CHECKSEQUENCEVERIFY (BIP112) | // enable CHECKSEQUENCEVERIFY (BIP112) | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), | ||||
// enable WITNESS (BIP141) | // enable WITNESS (BIP141) | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS_DEPRECATED = (1U << 11), | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS_DEPRECATED = (1U << 11), | ||||
// enable SIGHASH_FORKID replay protection | // enable SIGHASH_FORKID replay protection | ||||
bitcoinconsensus_SCRIPT_ENABLE_SIGHASH_FORKID = (1U << 16), | bitcoinconsensus_SCRIPT_ENABLE_SIGHASH_FORKID = (1U << 16), | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL = | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL = | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH | | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH | | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG | | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG | | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY | | |||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY | | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY | | ||||
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY, | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY, | ||||
}; | }; | ||||
/// Returns 1 if the input nIn of the serialized transaction pointed to by txTo | /// Returns 1 if the input nIn of the serialized transaction pointed to by txTo | ||||
/// correctly spends the scriptPubKey pointed to by scriptPubKey under the | /// correctly spends the scriptPubKey pointed to by scriptPubKey under the | ||||
/// additional constraints specified by flags. | /// additional constraints specified by flags. | ||||
/// If not nullptr, err will contain an error/success code for the operation | /// If not nullptr, err will contain an error/success code for the operation | ||||
Show All 19 Lines |