Fabcoin Core  0.16.2
P2P Digital Currency
consensus.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2017 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 FABCOIN_CONSENSUS_CONSENSUS_H
7 #define FABCOIN_CONSENSUS_CONSENSUS_H
8 
9 #include <stdlib.h>
10 #include <stdint.h>
11 
13 extern unsigned int dgpMaxBlockSerSize;
14 extern unsigned int dgpMaxBlockWeight;
15 extern unsigned int dgpMaxBlockBaseSize;
16 extern unsigned int dgpMaxBlockSize; // fasc
17 extern int64_t dgpMaxBlockSigOps;
18 extern unsigned int dgpMaxProtoMsgLength;
19 extern unsigned int dgpMaxTxSigOps;
20 
21 //static const int MAX_TRANSACTION_BASE_SIZE = 1000000;
22 static const int MAX_TRANSACTION_BASE_SIZE = 2000000;
23 
24 //static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 4000000;
25 static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 8000000;
27 //static const unsigned int MAX_BLOCK_WEIGHT = 4000000;
28 static const unsigned int MAX_BLOCK_WEIGHT = 8000000;
30 static const int64_t MAX_BLOCK_SIGOPS_COST = 80000;
32 static const int COINBASE_MATURITY = 800;
33 
34 static const int INITIAL_BLOCK_REWARD = 25;
35 static const int INITIAL_BLOCK_REWARD_REGTEST = 20000;
36 
37 static const int WITNESS_SCALE_FACTOR = 4;
38 
39 static const size_t MIN_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 60; // 60 is the lower bound for the size of a valid serialized CTransaction
40 static const size_t MIN_SERIALIZABLE_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 10; // 10 is the lower bound for the size of a serialized CTransaction
41 
43 enum {
44  /* Interpret sequence numbers as relative lock-time constraints. */
46 
47  /* Use GetMedianTimePast() instead of nTime for end point timestamp. */
49 };
50 
51 void updateBlockSizeParams(unsigned int newBlockSize);
52 #endif // FABCOIN_CONSENSUS_CONSENSUS_H
unsigned int dgpMaxBlockBaseSize
The maximum allowed size for a block excluding witness data, in bytes (network rule) ...
Definition: consensus.cpp:10
unsigned int dgpMaxBlockSize
Definition: consensus.cpp:12
unsigned int dgpMaxProtoMsgLength
Definition: consensus.cpp:17
unsigned int dgpMaxBlockSerSize
The maximum allowed size for a serialized block, in bytes (only for buffer size limits) ...
Definition: consensus.cpp:6
void updateBlockSizeParams(unsigned int newBlockSize)
Definition: consensus.cpp:21
int64_t dgpMaxBlockSigOps
The maximum allowed number of signature check operations in a block (network rule) ...
Definition: consensus.cpp:15
unsigned int dgpMaxTxSigOps
Definition: consensus.cpp:19
unsigned int dgpMaxBlockWeight
The maximum allowed weight for a block, see BIP 141 (network rule)
Definition: consensus.cpp:8