mining: include 'segwit' rule when no segwit txns in GBT #81

Merged
roylee17 merged 1 commit from roylee/mining-include-rules-in-gbt2 into master 2022-08-08 09:49:16 +02:00

View file

@ -1900,6 +1900,8 @@ func (state *gbtWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld
if template.WitnessCommitment != nil { if template.WitnessCommitment != nil {
reply.DefaultWitnessCommitment = hex.EncodeToString(template.WitnessCommitment) reply.DefaultWitnessCommitment = hex.EncodeToString(template.WitnessCommitment)
reply.Rules = append(reply.Rules, "!segwit") reply.Rules = append(reply.Rules, "!segwit")
} else {
reply.Rules = append(reply.Rules, "segwit")
} }
if useCoinbaseValue { if useCoinbaseValue {