From d75e73cbb89784911714e9e0799c116d3a8b716a Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Wed, 21 Aug 2024 00:39:03 -0400 Subject: [PATCH] Add .String() to Fork testing utility --- upgrade/upgradetest/fork.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/upgrade/upgradetest/fork.go b/upgrade/upgradetest/fork.go index 01c9b2ea03ee..706fcb50fdd8 100644 --- a/upgrade/upgradetest/fork.go +++ b/upgrade/upgradetest/fork.go @@ -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" + } +}