aboutsummaryrefslogtreecommitdiff
path: root/src/consensus/consensus.h
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2015-12-07 15:44:16 -0500
committerBtcDrak <btcdrak@gmail.com>2016-03-18 09:14:52 +0000
commit15ba08c3b5f66a6c4726a746affc7fb3216d4206 (patch)
tree4f05b267f52affe50d5e59f5f007d2a6161a6c52 /src/consensus/consensus.h
parentb4662646352dfe3d3f9bc46682a38973a119d0d8 (diff)
downloadbitcoin-15ba08c3b5f66a6c4726a746affc7fb3216d4206.tar.xz
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/consensus.h')
-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 5a099cf53c..ad9cc26175 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),
};