diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-05 16:49:57 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-26 00:10:30 +0200 |
commit | 1e65f0f3396d5d7eaa8e8dd3668dfa180b541c18 (patch) | |
tree | 43cde6e010c80c898d49c7670ed9a63826c4e9b2 /src/consensus/consensus.h | |
parent | 1caafa6cde3b88d926611771f9b4c06fcc6e0007 (diff) |
Use compile-time constants instead of unnamed enumerations (remove "enum hack")
Diffstat (limited to 'src/consensus/consensus.h')
-rw-r--r-- | src/consensus/consensus.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h index ddd4ee9fab..6e3bac2d0e 100644 --- a/src/consensus/consensus.h +++ b/src/consensus/consensus.h @@ -24,12 +24,9 @@ static const size_t MIN_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 60; // 60 is static const size_t MIN_SERIALIZABLE_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 10; // 10 is the lower bound for the size of a serialized CTransaction /** Flags for nSequence and nLockTime locks */ -enum { - /* Interpret sequence numbers as relative lock-time constraints. */ - LOCKTIME_VERIFY_SEQUENCE = (1 << 0), - - /* Use GetMedianTimePast() instead of nTime for end point timestamp. */ - LOCKTIME_MEDIAN_TIME_PAST = (1 << 1), -}; +/** Interpret sequence numbers as relative lock-time constraints. */ +static constexpr unsigned int LOCKTIME_VERIFY_SEQUENCE = (1 << 0); +/** Use GetMedianTimePast() instead of nTime for end point timestamp. */ +static constexpr unsigned int LOCKTIME_MEDIAN_TIME_PAST = (1 << 1); #endif // BITCOIN_CONSENSUS_CONSENSUS_H |