diff --git a/btcjson/chainsvrresults.go b/btcjson/chainsvrresults.go index e82a14bc..ecc26827 100644 --- a/btcjson/chainsvrresults.go +++ b/btcjson/chainsvrresults.go @@ -300,6 +300,8 @@ type GetBlockTemplateResult struct { RejectReasion string `json:"reject-reason,omitempty"` ClaimTrieHash string `json:"claimtrie"` + + Rules []string `json:"rules,omitempty"` } // GetMempoolEntryResult models the data returned from the getmempoolentry's diff --git a/rpcserver.go b/rpcserver.go index 607733e1..7014c7b6 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1771,6 +1771,7 @@ func (state *gbtWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld // data, then include the witness commitment in the GBT result. if template.WitnessCommitment != nil { reply.DefaultWitnessCommitment = hex.EncodeToString(template.WitnessCommitment) + reply.Rules = append(reply.Rules, "!segwit") } if useCoinbaseValue {