diff options
| author | Pieter Wuille <[email protected]> | 2016-11-18 12:15:01 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-11-21 15:01:04 -0800 |
| commit | ad04d1cb35b9612d36078c62213bdbb13f56d73d (patch) | |
| tree | 7ccd702d3a83693cf5ad21ff1e1ce9ca6d6309f7 /src/main.cpp | |
| parent | Merge #8872: Remove block-request logic from INV message processing (diff) | |
| download | discoin-ad04d1cb35b9612d36078c62213bdbb13f56d73d.tar.xz discoin-ad04d1cb35b9612d36078c62213bdbb13f56d73d.zip | |
Always add default_witness_commitment with GBT client support
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 4293a6beb..56a510384 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3531,15 +3531,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()); |