aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-18 12:15:01 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-21 15:01:04 -0800
commitad04d1cb35b9612d36078c62213bdbb13f56d73d (patch)
tree7ccd702d3a83693cf5ad21ff1e1ce9ca6d6309f7 /src/main.cpp
parent0c577f2638b7f701e4b4b96c4c8df39dc097cf2f (diff)
Always add default_witness_commitment with GBT client support
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4293a6bebf..56a5103849 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());