Fabcoin Core  0.16.2
P2P Digital Currency
consensus.cpp
Go to the documentation of this file.
1 #include <consensus/consensus.h>
3 #include <policy/policy.h>
4 
6 unsigned int dgpMaxBlockSerSize = 8000000;
8 unsigned int dgpMaxBlockWeight = 8000000;
10 unsigned int dgpMaxBlockBaseSize = 2000000;
11 
12 unsigned int dgpMaxBlockSize = 2000000; // fasc
13 
15 int64_t dgpMaxBlockSigOps = 80000;
16 
17 unsigned int dgpMaxProtoMsgLength = 8000000;
18 
19 unsigned int dgpMaxTxSigOps = 16000;
20 
21 void updateBlockSizeParams(unsigned int newBlockSize){
22  unsigned int newSizeForParams=WITNESS_SCALE_FACTOR*newBlockSize;
23  dgpMaxBlockSerSize=newSizeForParams;
24  dgpMaxBlockWeight=newSizeForParams;
25  dgpMaxBlockBaseSize=newBlockSize;
26  dgpMaxBlockSigOps=(int64_t)(newSizeForParams/100);
27  dgpMaxTxSigOps = (unsigned int)(dgpMaxBlockSigOps/5);
28  dgpMaxProtoMsgLength=newSizeForParams;
29 }
unsigned int dgpMaxBlockSerSize
The maximum allowed size for a serialized block, in bytes (only for buffer size limits) ...
Definition: consensus.cpp:6
unsigned int dgpMaxBlockBaseSize
The maximum allowed size for a block excluding witness data, in bytes (network rule) ...
Definition: consensus.cpp:10
int64_t dgpMaxBlockSigOps
The maximum allowed number of signature check operations in a block (network rule) ...
Definition: consensus.cpp:15
unsigned int dgpMaxBlockSize
Definition: consensus.cpp:12
void updateBlockSizeParams(unsigned int newBlockSize)
Definition: consensus.cpp:21
unsigned int dgpMaxTxSigOps
The maximum number of sigops we&#39;re willing to relay/mine in a single tx.
Definition: consensus.cpp:19
unsigned int dgpMaxProtoMsgLength
Definition: consensus.cpp:17
unsigned int dgpMaxBlockWeight
The maximum allowed weight for a block, see BIP 141 (network rule)
Definition: consensus.cpp:8