Browse Source

add beforeUpgrade and afterUpgrade

HaoyangLiu 5 years ago
parent
commit
13cca06be8
2 changed files with 13 additions and 5 deletions
  1. 8 5
      core/systemcontractupgrade/system-contract-upgrade.go
  2. 5 0
      params/config.go

File diff suppressed because it is too large
+ 8 - 5
core/systemcontractupgrade/system-contract-upgrade.go


+ 5 - 0
params/config.go

@@ -444,6 +444,11 @@ func (c *ChainConfig) IsRamanujan(num *big.Int) bool {
 	return isForked(c.RamanujanBlock, num)
 }
 
+// IsOnRamanujan returns whether num is equal to the IsRamanujan fork block
+func (c *ChainConfig) IsOnRamanujan(num *big.Int) bool {
+	return configNumEqual(c.RamanujanBlock, num)
+}
+
 // IsMuirGlacier returns whether num is either equal to the Muir Glacier (EIP-2384) fork block or greater.
 func (c *ChainConfig) IsMuirGlacier(num *big.Int) bool {
 	return isForked(c.MuirGlacierBlock, num)

Some files were not shown because too many files changed in this diff