aboutsummaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorAlex Morcos <[email protected]>2015-12-07 15:44:16 -0500
committerAlex Morcos <[email protected]>2016-02-10 15:35:33 -0500
commitc6c2f0fd782ccf607027414012f45c8f48561a30 (patch)
tree851d2b78c132cf851fafb35b6d62b7bf8f562ac6 /src/consensus
parentMerge pull request #6589 (diff)
downloaddiscoin-c6c2f0fd782ccf607027414012f45c8f48561a30.tar.xz
discoin-c6c2f0fd782ccf607027414012f45c8f48561a30.zip
Implement SequenceLocks functions
SequenceLocks functions are used to evaluate sequence lock times or heights per BIP 68. The majority of this code is copied from maaku in #6312 Further credit: btcdrak, sipa, NicolasDorier
Diffstat (limited to 'src/consensus')
-rw-r--r--src/consensus/consensus.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h
index 6d6ce7e09..1b28bb320 100644
--- a/src/consensus/consensus.h
+++ b/src/consensus/consensus.h
@@ -13,8 +13,11 @@ static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 100;
-/** Flags for LockTime() */
+/** 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),
};