diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2017-03-08 15:56:59 -0500 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2017-03-14 06:43:37 -0400 |
commit | abe7b3d3abe10e3554b770f40824174b3b217490 (patch) | |
tree | 45054c26ef435b80eebdf9c5965023592b749e63 /src/miner.cpp | |
parent | 3cc13eac40a0d65f7b4c8d1bc74cb7060b5e1eb1 (diff) |
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.
Diffstat (limited to 'src/miner.cpp')
-rw-r--r-- | src/miner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 67e7ff155b..ff28a5680e 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -137,7 +137,7 @@ void BlockAssembler::resetBlock() nFees = 0; } -std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn) +std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn, bool fMineWitnessTx) { resetBlock(); @@ -175,7 +175,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; addPackageTxs(); |