diff --git a/src/miner.h b/src/miner.h --- a/src/miner.h +++ b/src/miner.h @@ -161,14 +161,13 @@ int64_t nLockTimeCutoff; int64_t nMedianTimePast; - const Config *config; const CTxMemPool *mempool; // Variables used for addPriorityTxs int lastFewTxs; public: - BlockAssembler(const Config &_config, const CTxMemPool &mempool); + BlockAssembler(const Config &config, const CTxMemPool &mempool); /** Construct a new block template with coinbase to scriptPubKeyIn */ std::unique_ptr CreateNewBlock(const Config &config, const CScript &scriptPubKeyIn); diff --git a/src/miner.cpp b/src/miner.cpp --- a/src/miner.cpp +++ b/src/miner.cpp @@ -81,8 +81,8 @@ return nMaxGeneratedBlockSize; } -BlockAssembler::BlockAssembler(const Config &_config, const CTxMemPool &mpool) - : config(&_config), mempool(&mpool) { +BlockAssembler::BlockAssembler(const Config &config, const CTxMemPool &mpool) + : mempool(&mpool) { if (gArgs.IsArgSet("-blockmintxfee")) { Amount n = Amount::zero(); @@ -94,7 +94,7 @@ LOCK(cs_main); nMaxGeneratedBlockSize = - ComputeMaxGeneratedBlockSize(*config, chainActive.Tip()); + ComputeMaxGeneratedBlockSize(config, chainActive.Tip()); } void BlockAssembler::resetBlock() {