@@ -59,19 +59,47 @@ case class ForkBlockNumbers(
5959 ecip1098BlockNumber : BigInt ,
6060 ecip1097BlockNumber : BigInt ,
6161 ecip1049BlockNumber : Option [BigInt ],
62- ecip1099BlockNumber : BigInt
62+ ecip1099BlockNumber : BigInt ,
63+ magnetoBlockNumber : BigInt
6364) {
6465 def all : List [BigInt ] = this .productIterator.toList.flatMap {
6566 case i : BigInt => Some (i)
6667 case i : Option [_] =>
6768 i.flatMap {
6869 case n if n.isInstanceOf [BigInt ] => Some (n.asInstanceOf [BigInt ])
69- case n => None
70+ case _ => None
7071 }
71- case default => None
72+ case _ => None
7273 }
7374}
7475
76+ object ForkBlockNumbers {
77+ val Empty : ForkBlockNumbers = ForkBlockNumbers (
78+ frontierBlockNumber = 0 ,
79+ homesteadBlockNumber = Long .MaxValue ,
80+ difficultyBombPauseBlockNumber = Long .MaxValue ,
81+ difficultyBombContinueBlockNumber = Long .MaxValue ,
82+ difficultyBombRemovalBlockNumber = Long .MaxValue ,
83+ eip106BlockNumber = Long .MaxValue ,
84+ eip150BlockNumber = Long .MaxValue ,
85+ eip160BlockNumber = Long .MaxValue ,
86+ eip155BlockNumber = Long .MaxValue ,
87+ eip161BlockNumber = Long .MaxValue ,
88+ byzantiumBlockNumber = Long .MaxValue ,
89+ constantinopleBlockNumber = Long .MaxValue ,
90+ istanbulBlockNumber = Long .MaxValue ,
91+ atlantisBlockNumber = Long .MaxValue ,
92+ aghartaBlockNumber = Long .MaxValue ,
93+ phoenixBlockNumber = Long .MaxValue ,
94+ petersburgBlockNumber = Long .MaxValue ,
95+ ecip1098BlockNumber = Long .MaxValue ,
96+ ecip1097BlockNumber = Long .MaxValue ,
97+ ecip1099BlockNumber = Long .MaxValue ,
98+ ecip1049BlockNumber = None ,
99+ magnetoBlockNumber = Long .MaxValue
100+ )
101+ }
102+
75103object BlockchainConfig {
76104
77105 // scalastyle:off method.length
@@ -139,6 +167,8 @@ object BlockchainConfig {
139167 val allowedMinersPublicKeys = readPubKeySet(blockchainConfig, " allowed-miners" )
140168
141169 val ecip1099BlockNumber : BigInt = BigInt (blockchainConfig.getString(" ecip1099-block-number" ))
170+ val magnetoBlockNumber : BigInt = BigInt (blockchainConfig.getString(" magneto-block-number" ))
171+
142172 val capabilities : List [Capability ] =
143173 blockchainConfig.getStringList(" capabilities" ).asScala.toList.map(Capability .parseUnsafe)
144174
@@ -165,7 +195,8 @@ object BlockchainConfig {
165195 ecip1098BlockNumber = ecip1098BlockNumber,
166196 ecip1097BlockNumber = ecip1097BlockNumber,
167197 ecip1049BlockNumber = ecip1049BlockNumber,
168- ecip1099BlockNumber = ecip1099BlockNumber
198+ ecip1099BlockNumber = ecip1099BlockNumber,
199+ magnetoBlockNumber = magnetoBlockNumber
169200 ),
170201 treasuryAddress = treasuryAddress,
171202 maxCodeSize = maxCodeSize,
0 commit comments