mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Always add default_witness_commitment with GBT client support
This commit is contained in:
@@ -680,7 +680,9 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
|
||||
result.push_back(Pair("curtime", pblock->GetBlockTime()));
|
||||
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
|
||||
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
|
||||
if (!pblocktemplate->vchCoinbaseCommitment.empty()) {
|
||||
|
||||
const struct BIP9DeploymentInfo& segwit_info = VersionBitsDeploymentInfo[Consensus::DEPLOYMENT_SEGWIT];
|
||||
if (!pblocktemplate->vchCoinbaseCommitment.empty() && setClientRules.find(segwit_info.name) != setClientRules.end()) {
|
||||
result.push_back(Pair("default_witness_commitment", HexStr(pblocktemplate->vchCoinbaseCommitment.begin(), pblocktemplate->vchCoinbaseCommitment.end())));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user