[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 8205e467af
commit 207fadab42
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 {