mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-04 06:12:07 +01:00
Don't require segwit in getblocktemplate for segwit signalling or mining
Segwit's version bit will be signalled for all invocations of CreateNewBlock,
and not specifying segwit only will cause CreateNewBlock to skip transactions
with witness from being selected.
Github-Pull: #9955
Rebased-From: abe7b3d3ab
This commit is contained in:
@@ -127,7 +127,7 @@ void BlockAssembler::resetBlock()
|
||||
blockFinished = false;
|
||||
}
|
||||
|
||||
std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn, bool fMineWitnessTx)
|
||||
{
|
||||
resetBlock();
|
||||
|
||||
@@ -165,7 +165,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
|
||||
// -promiscuousmempoolflags is used.
|
||||
// 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());
|
||||
fIncludeWitness = IsWitnessEnabled(pindexPrev, chainparams.GetConsensus()) && fMineWitnessTx;
|
||||
|
||||
addPriorityTxs();
|
||||
addPackageTxs();
|
||||
|
||||
Reference in New Issue
Block a user