@@ -38,35 +38,10 @@ impl ForkName {
38
38
. into_iter ( )
39
39
// Skip Base
40
40
. skip ( 1 )
41
- . map ( |fork| ( fork, fork . fork_epoch ( spec ) ) )
41
+ . map ( |fork| ( fork, spec . fork_epoch ( fork ) ) )
42
42
. collect ( )
43
43
}
44
44
45
- pub fn fork_epoch ( self , spec : & ChainSpec ) -> Option < Epoch > {
46
- match self {
47
- Self :: Base => Some ( Epoch :: new ( 0 ) ) ,
48
- Self :: Altair => spec. altair_fork_epoch ,
49
- Self :: Bellatrix => spec. bellatrix_fork_epoch ,
50
- Self :: Capella => spec. capella_fork_epoch ,
51
- Self :: Deneb => spec. deneb_fork_epoch ,
52
- Self :: Electra => spec. electra_fork_epoch ,
53
- Self :: Fulu => spec. fulu_fork_epoch ,
54
- }
55
- }
56
-
57
- /// Returns the fork version of a fork
58
- pub fn fork_version ( self , spec : & ChainSpec ) -> [ u8 ; 4 ] {
59
- match self {
60
- Self :: Base => spec. genesis_fork_version ,
61
- Self :: Altair => spec. altair_fork_version ,
62
- Self :: Bellatrix => spec. bellatrix_fork_version ,
63
- Self :: Capella => spec. capella_fork_version ,
64
- Self :: Deneb => spec. deneb_fork_version ,
65
- Self :: Electra => spec. electra_fork_version ,
66
- Self :: Fulu => spec. fulu_fork_version ,
67
- }
68
- }
69
-
70
45
pub fn latest ( ) -> ForkName {
71
46
// This unwrap is safe as long as we have 1+ forks. It is tested below.
72
47
* ForkName :: list_all ( ) . last ( ) . unwrap ( )
0 commit comments