From d7d5fde249882b14482e34dd411dcaa8cfbb2f9f Mon Sep 17 00:00:00 2001 From: Brannon King Date: Fri, 30 Jul 2021 14:12:28 -0400 Subject: [PATCH] [lbry] rpc: output segwit rule --- btcjson/chainsvrresults.go | 2 ++ rpcserver.go | 1 + 2 files changed, 3 insertions(+) diff --git a/btcjson/chainsvrresults.go b/btcjson/chainsvrresults.go index 6a99b2d3..5c9c9b93 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 {