Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/validation.h
Show All 10 Lines | |||||
/** "reject" message codes */ | /** "reject" message codes */ | ||||
static const uint8_t REJECT_MALFORMED = 0x01; | static const uint8_t REJECT_MALFORMED = 0x01; | ||||
static const uint8_t REJECT_INVALID = 0x10; | static const uint8_t REJECT_INVALID = 0x10; | ||||
static const uint8_t REJECT_OBSOLETE = 0x11; | static const uint8_t REJECT_OBSOLETE = 0x11; | ||||
static const uint8_t REJECT_DUPLICATE = 0x12; | static const uint8_t REJECT_DUPLICATE = 0x12; | ||||
static const uint8_t REJECT_NONSTANDARD = 0x40; | static const uint8_t REJECT_NONSTANDARD = 0x40; | ||||
static const uint8_t REJECT_INSUFFICIENTFEE = 0x42; | static const uint8_t REJECT_INSUFFICIENTFEE = 0x42; | ||||
static const uint8_t REJECT_CHECKPOINT = 0x43; | static const uint8_t REJECT_CHECKPOINT = 0x43; | ||||
static const uint8_t REJECT_NOT_READY = 0x44; | |||||
jasonbcox: I was going to suggest using `0x80` or something so as not to collide with any new message… | |||||
/** Capture information about block/transaction validation */ | /** Capture information about block/transaction validation */ | ||||
class CValidationState { | class CValidationState { | ||||
private: | private: | ||||
enum mode_state { | enum mode_state { | ||||
MODE_VALID, //!< everything ok | MODE_VALID, //!< everything ok | ||||
MODE_INVALID, //!< network rule violation (DoS value may be set) | MODE_INVALID, //!< network rule violation (DoS value may be set) | ||||
MODE_ERROR, //!< run-time error | MODE_ERROR, //!< run-time error | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |
I was going to suggest using 0x80 or something so as not to collide with any new message codes added by Core. As it turns out, they removed BIP61 reject messages... I guess we're in the clear there. :P