Skip to content

Commit

Permalink
params: clarify consensus engine config Strings (#29643)
Browse files Browse the repository at this point in the history
Define these on a value receiever so that nil is shown differently.
  • Loading branch information
roysc committed Apr 28, 2024
1 parent 4253030 commit 4bdbaab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions params/config.go
Expand Up @@ -374,7 +374,7 @@ type ChainConfig struct {
type EthashConfig struct{}

// String implements the stringer interface, returning the consensus engine details.
func (c *EthashConfig) String() string {
func (c EthashConfig) String() string {
return "ethash"
}

Expand All @@ -385,8 +385,8 @@ type CliqueConfig struct {
}

// String implements the stringer interface, returning the consensus engine details.
func (c *CliqueConfig) String() string {
return "clique"
func (c CliqueConfig) String() string {
return fmt.Sprintf("clique(period: %d, epoch: %d)", c.Period, c.Epoch)
}

// Description returns a human-readable description of ChainConfig.
Expand Down

0 comments on commit 4bdbaab

Please sign in to comment.