From 36ce9a0b0df288dddc051c3208a7833858059b5d Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Mon, 19 Jul 2021 18:28:31 +0000 Subject: [PATCH] Always consider segwit txs when mining - A less simple fix might be in order for this. Not sure if it matters for mainnet --- src/miner.cpp | 4 +++- src/rpc/mining.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 9150004e8e005..b3d58c14e07f3 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -163,7 +163,9 @@ std::unique_ptr BlockAssembler::CreateNewBlock(const CScript& sc // 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 = DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_SEGWIT); + + fIncludeWitness = /*DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_SEGWIT)*/ true; + // TODO: ensure static value is okay here int nPackagesSelected = 0; int nDescendantsUpdated = 0; diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 2762d78493b2a..6a9fd18edfbe4 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -775,7 +775,8 @@ static RPCHelpMan getblocktemplate() pblock->nNonce = 0; // NOTE: If at some point we support pre-segwit miners post-segwit-activation, this needs to take segwit support into consideration - const bool fPreSegWit = !DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_SEGWIT); + const bool fPreSegWit = false; + //const bool fPreSegwit = !DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_SEGWIT); UniValue aCaps(UniValue::VARR); aCaps.push_back("proposal");