diff options
Diffstat (limited to 'src/miner.cpp')
-rw-r--r-- | src/miner.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index dcb6c1f8eb..6d35f9ac37 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -64,7 +64,7 @@ BlockAssembler::BlockAssembler(const CChainParams& params, const Options& option nBlockMaxWeight = std::max<size_t>(4000, std::min<size_t>(MAX_BLOCK_WEIGHT - 4000, options.nBlockMaxWeight)); } -static BlockAssembler::Options DefaultOptions(const CChainParams& params) +static BlockAssembler::Options DefaultOptions() { // Block resource limits // If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT @@ -80,7 +80,7 @@ static BlockAssembler::Options DefaultOptions(const CChainParams& params) return options; } -BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions(params)) {} +BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions()) {} void BlockAssembler::resetBlock() { @@ -133,8 +133,11 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc // Decide whether to include witness transactions // This is only needed in case the witness softfork activation is reverted - // (which would require a very deep reorganization) or when - // -promiscuousmempoolflags is used. + // (which would require a very deep reorganization). + // Note that the mempool would accept transactions with witness data before + // IsWitnessEnabled, but we would only ever mine blocks after IsWitnessEnabled + // unless there is a massive block reorganization with the witness softfork + // not activated. // TODO: replace this with a call to main to assess validity of a mempool // transaction (which in most cases can be a no-op). fIncludeWitness = IsWitnessEnabled(pindexPrev, chainparams.GetConsensus()) && fMineWitnessTx; |