mining: include 'segwit' rule when no segwit txns in GBT
According to the BIP0009, all active softfork deployment should be included in the rules. We add the '!' to indicate the enforcement if the template has any segwit transactions in it. Otherwise, plain `segwit` is fine.
This commit is contained in:
parent
a9351b3e3a
commit
fdedbf86f8
1 changed files with 2 additions and 0 deletions
|
@ -1900,6 +1900,8 @@ func (state *gbtWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld
|
|||
if template.WitnessCommitment != nil {
|
||||
reply.DefaultWitnessCommitment = hex.EncodeToString(template.WitnessCommitment)
|
||||
reply.Rules = append(reply.Rules, "!segwit")
|
||||
} else {
|
||||
reply.Rules = append(reply.Rules, "segwit")
|
||||
}
|
||||
|
||||
if useCoinbaseValue {
|
||||
|
|
Loading…
Reference in a new issue