github.com/MetalBlockchain/subnet-evm@v0.4.9/params/network_upgrades.go (about) 1 // (c) 2022, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package params 5 6 import ( 7 "math/big" 8 ) 9 10 // NetworkUpgrades contains timestamps that enable metal network upgrades. 11 type NetworkUpgrades struct { 12 SubnetEVMTimestamp *big.Int `json:"subnetEVMTimestamp,omitempty"` // A placeholder for the latest metal forks (nil = no fork, 0 = already activated) 13 } 14 15 func (n *NetworkUpgrades) CheckCompatible(newcfg *NetworkUpgrades, headTimestamp *big.Int) *ConfigCompatError { 16 // Check subnet-evm specific activations 17 if isForkIncompatible(n.SubnetEVMTimestamp, newcfg.SubnetEVMTimestamp, headTimestamp) { 18 return newCompatError("SubnetEVM fork block timestamp", n.SubnetEVMTimestamp, newcfg.SubnetEVMTimestamp) 19 } 20 21 return nil 22 }