diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-25 08:25:30 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-25 08:26:25 +0100 |
commit | d932159f3467cc197caaf281f34f3324e6b5bea8 (patch) | |
tree | 060c7278581eeeeaade71153af302c9239751fdb /src/main.cpp | |
parent | bc121b0eb19713ec72002b5be03ba5ac35903a17 (diff) | |
parent | 95f4a03777ec2ad82a94a3e2890192a93ad83509 (diff) |
Merge #9189: Always add default_witness_commitment with GBT client support
95f4a03 [qa] Test getblocktemplate default_witness_commitment (Suhas Daftuar)
ad04d1c Always add default_witness_commitment with GBT client support (Pieter Wuille)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index 05442057e4..2fe993ca49 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3511,15 +3511,8 @@ std::vector<unsigned char> GenerateCoinbaseCommitment(CBlock& block, const CBloc { std::vector<unsigned char> commitment; int commitpos = GetWitnessCommitmentIndex(block); - bool fHaveWitness = false; - for (size_t t = 1; t < block.vtx.size(); t++) { - if (!block.vtx[t]->wit.IsNull()) { - fHaveWitness = true; - break; - } - } std::vector<unsigned char> ret(32, 0x00); - if (fHaveWitness && IsWitnessEnabled(pindexPrev, consensusParams)) { + if (consensusParams.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout != 0) { if (commitpos == -1) { uint256 witnessroot = BlockWitnessMerkleRoot(block, NULL); CHash256().Write(witnessroot.begin(), 32).Write(&ret[0], 32).Finalize(witnessroot.begin()); |