Skip to content

Commit

Permalink
Add .String() to Fork testing utility (#3315)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Aug 21, 2024
1 parent 34aa2a3 commit 315496f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions upgrade/upgradetest/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,36 @@ const (

// Fork is an enum of all the major network upgrades.
type Fork int

func (f Fork) String() string {
switch f {
case Etna:
return "Etna"
case Durango:
return "Durango"
case Cortina:
return "Cortina"
case Banff:
return "Banff"
case ApricotPhasePost6:
return "ApricotPhasePost6"
case ApricotPhase6:
return "ApricotPhase6"
case ApricotPhasePre6:
return "ApricotPhasePre6"
case ApricotPhase5:
return "ApricotPhase5"
case ApricotPhase4:
return "ApricotPhase4"
case ApricotPhase3:
return "ApricotPhase3"
case ApricotPhase2:
return "ApricotPhase2"
case ApricotPhase1:
return "ApricotPhase1"
case NoUpgrades:
return "NoUpgrades"
default:
return "Unknown"
}
}

0 comments on commit 315496f

Please # to comment.