diff --git a/src/miner.h b/src/miner.h --- a/src/miner.h +++ b/src/miner.h @@ -184,7 +184,7 @@ // Methods for how to add transactions to a block. /** Add transactions based on tx "priority" */ - void addPriorityTxs(); + void addPriorityTxs(const Config &config); /** * Add transactions based on feerate including unconfirmed ancestors. * Increments nPackagesSelected / nDescendantsUpdated with corresponding diff --git a/src/miner.cpp b/src/miner.cpp --- a/src/miner.cpp +++ b/src/miner.cpp @@ -160,7 +160,7 @@ ? nMedianTimePast : pblock->GetBlockTime(); - addPriorityTxs(); + addPriorityTxs(config); int nPackagesSelected = 0; int nDescendantsUpdated = 0; addPackageTxs(config, nPackagesSelected, nDescendantsUpdated); @@ -585,15 +585,15 @@ } } -void BlockAssembler::addPriorityTxs() { +void BlockAssembler::addPriorityTxs(const Config &config) { // How much of the block should be dedicated to high-priority transactions, // included regardless of the fees they pay. - if (config->GetBlockPriorityPercentage() == 0) { + if (config.GetBlockPriorityPercentage() == 0) { return; } uint64_t nBlockPrioritySize = - nMaxGeneratedBlockSize * config->GetBlockPriorityPercentage() / 100; + nMaxGeneratedBlockSize * config.GetBlockPriorityPercentage() / 100; // This vector will be sorted into a priority queue: std::vector vecPriority;