Raven Core  3.0.0
P2P Digital Currency
consensus.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 The Bitcoin Core developers
3 // Copyright (c) 2017-2019 The Raven Core developers
4 // Distributed under the MIT software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #ifndef RAVEN_CONSENSUS_CONSENSUS_H
8 #define RAVEN_CONSENSUS_CONSENSUS_H
9 
10 #include <stdlib.h>
11 #include <stdint.h>
12 
14 static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 4000000;
16 static const unsigned int MAX_BLOCK_WEIGHT = 4000000;
17 
19 static const unsigned int MAX_BLOCK_WEIGHT_RIP2 = 8000000;
20 
22 static const unsigned int MAX_BLOCK_SERIALIZED_SIZE_RIP2 = 8000000;
23 
25 static const int64_t MAX_BLOCK_SIGOPS_COST = 80000;
27 static const int COINBASE_MATURITY = 100;
28 
29 static const int WITNESS_SCALE_FACTOR = 4;
30 
31 static const size_t MIN_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 60; // 60 is the lower bound for the size of a valid serialized CTransaction
32 static const size_t MIN_SERIALIZABLE_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 10; // 10 is the lower bound for the size of a serialized CTransaction
33 
34 #define UNUSED_VAR __attribute__ ((unused))
35 UNUSED_VAR static bool fAssetsIsActive = false;
38 UNUSED_VAR static bool fMessagesIsActive = false;
39 UNUSED_VAR static bool fRestrictedAssetsIsActive = false;
40 
41 unsigned int GetMaxBlockWeight();
42 unsigned int GetMaxBlockSerializedSize();
43 
45 enum {
46  /* Interpret sequence numbers as relative lock-time constraints. */
48 
49  /* Use GetMedianTimePast() instead of nTime for end point timestamp. */
51 };
52 
53 #endif // RAVEN_CONSENSUS_CONSENSUS_H
#define UNUSED_VAR
Definition: consensus.h:34
unsigned int GetMaxBlockSerializedSize()
Definition: consensus.cpp:19
unsigned int GetMaxBlockWeight()
Definition: consensus.cpp:8