diff options
| author | Suhas Daftuar <[email protected]> | 2017-03-08 15:56:59 -0500 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2017-03-16 10:43:54 -0400 |
| commit | 569596cc5148ef868350a9720013d38faf3e34ce (patch) | |
| tree | 907377b3adb5cb56ae99a44c0ac425167a970bc4 /src/miner.cpp | |
| parent | Fix regsig checking for subkey sigs in verify-commits (diff) | |
| download | discoin-569596cc5148ef868350a9720013d38faf3e34ce.tar.xz discoin-569596cc5148ef868350a9720013d38faf3e34ce.zip | |
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: abe7b3d3abe10e3554b770f40824174b3b217490
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 d01edd93b..7b3d94d0e 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -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(); |