Skip to content

Commit

Permalink
Merge pull request #5 from who-biz/blocktemplate-quickfix
Browse files Browse the repository at this point in the history
Quick fix for `getblocktemplate`, gets mining and mempool working
  • Loading branch information
satindergrewal authored Jul 20, 2021
2 parents db34e4d + 36ce9a0 commit ce47b5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ std::unique_ptr<CBlockTemplate> 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;
Expand Down
3 changes: 2 additions & 1 deletion src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit ce47b5b

Please sign in to comment.