diff --git a/src/config.h b/src/config.h --- a/src/config.h +++ b/src/config.h @@ -73,6 +73,10 @@ std::string rpcUserAndPassword; // CORS domain, the allowed Origin std::string rpcCORSDomain; + + /** The largest block size this node will accept. */ + uint64_t nMaxBlockSize; + uint64_t nBlockPriorityPercentage; }; // Dummy for subclassing in unittests diff --git a/src/config.cpp b/src/config.cpp --- a/src/config.cpp +++ b/src/config.cpp @@ -4,10 +4,13 @@ #include "config.h" #include "chainparams.h" -#include "consensus/consensus.h" +#include "consensus/consensus.h" // DEFAULT_MAX_BLOCK_SIZE #include "globals.h" +#include "policy/policy.h" // DEFAULT_BLOCK_PRIORITY_PERCENTAGE -GlobalConfig::GlobalConfig() : useCashAddr(false) {} +GlobalConfig::GlobalConfig() + : useCashAddr(false), nMaxBlockSize(DEFAULT_MAX_BLOCK_SIZE), + nBlockPriorityPercentage(DEFAULT_BLOCK_PRIORITY_PERCENTAGE) {} bool GlobalConfig::SetMaxBlockSize(uint64_t maxBlockSize) { // Do not allow maxBlockSize to be set below historic 1MB limit diff --git a/src/globals.h b/src/globals.h --- a/src/globals.h +++ b/src/globals.h @@ -8,8 +8,4 @@ #include #include -/** The largest block size this node will accept. */ -extern uint64_t nMaxBlockSize; -extern uint64_t nBlockPriorityPercentage; - #endif // BITCOIN_GLOBALS_H diff --git a/src/globals.cpp b/src/globals.cpp --- a/src/globals.cpp +++ b/src/globals.cpp @@ -6,7 +6,3 @@ #include "consensus/consensus.h" #include "policy/policy.h" - -uint64_t nMaxBlockSize = DEFAULT_MAX_BLOCK_SIZE; -uint64_t nBlockPriorityPercentage = DEFAULT_BLOCK_PRIORITY_PERCENTAGE; -