use new(big.Int) so we don't modify the epoch value (#4523)

pull/4525/head
Diego Nava 1 year ago committed by GitHub
parent 2378b2d880
commit 3f6a0db28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      internal/params/config.go

@ -812,7 +812,7 @@ func (c *ChainConfig) IsHIP30(epoch *big.Int) bool {
// During this epoch, shards 2 and 3 will start sending
// their balances over to shard 0 or 1.
func (c *ChainConfig) IsOneEpochBeforeHIP30(epoch *big.Int) bool {
return epoch.Sub(c.HIP30Epoch, epoch).Cmp(common.Big1) == 0
return new(big.Int).Sub(c.HIP30Epoch, epoch).Cmp(common.Big1) == 0
}
// UpdateEthChainIDByShard update the ethChainID based on shard ID.

Loading…
Cancel
Save