Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

consensus.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2015 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_CONSENSUS_CONSENSUS_H
7 #define BITCOIN_CONSENSUS_CONSENSUS_H
8 
10 static const unsigned int MAX_LEGACY_BLOCK_SIZE = 1000000;
11 static const unsigned int MAX_DIP0001_BLOCK_SIZE = 2000000;
12 inline unsigned int MaxBlockSize(bool fDIP0001Active /*= false */)
13 {
14  return fDIP0001Active ? MAX_DIP0001_BLOCK_SIZE : MAX_LEGACY_BLOCK_SIZE;
15 }
17 inline unsigned int MaxBlockSigOps(bool fDIP0001Active /*= false */)
18 {
19  return MaxBlockSize(fDIP0001Active) / 50;
20 }
22 static const unsigned int MAX_TX_EXTRA_PAYLOAD = 10000;
24 static const int COINBASE_MATURITY = 100;
25 
28 static constexpr unsigned int LOCKTIME_VERIFY_SEQUENCE = (1 << 0);
30 static constexpr unsigned int LOCKTIME_MEDIAN_TIME_PAST = (1 << 1);
31 
32 #endif // BITCOIN_CONSENSUS_CONSENSUS_H
static constexpr unsigned int LOCKTIME_VERIFY_SEQUENCE
Flags for nSequence and nLockTime locks.
Definition: consensus.h:28
unsigned int MaxBlockSize(bool fDIP0001Active)
Definition: consensus.h:12
static const int COINBASE_MATURITY
Coinbase transaction outputs can only be spent after this number of new blocks (network rule) ...
Definition: consensus.h:24
static constexpr unsigned int LOCKTIME_MEDIAN_TIME_PAST
Use GetMedianTimePast() instead of nTime for end point timestamp.
Definition: consensus.h:30
static const unsigned int MAX_LEGACY_BLOCK_SIZE
The maximum allowed size for a serialized block, in bytes (network rule)
Definition: consensus.h:10
unsigned int MaxBlockSigOps(bool fDIP0001Active)
The maximum allowed number of signature check operations in a block (network rule) ...
Definition: consensus.h:17
static const unsigned int MAX_DIP0001_BLOCK_SIZE
Definition: consensus.h:11
static const unsigned int MAX_TX_EXTRA_PAYLOAD
The maximum allowed size of version 3 extra payload.
Definition: consensus.h:22
Released under the MIT license