[lbry] rpc: output segwit rule

This commit is contained in:
Brannon King 2021-07-30 14:12:28 -04:00 committed by Roy Lee
parent 096dd3ff75
commit 3d8f36a505
2 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -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 {