mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
fix int bitlength issue in TestChainConfig_LoadForks
This commit is contained in:
parent
d2acc9fe1b
commit
9dbe84dfcc
1 changed files with 4 additions and 0 deletions
|
|
@ -108,6 +108,8 @@ func (c *ChainConfig) LoadForks(file []byte) error {
|
|||
switch version := value.(type) {
|
||||
case int:
|
||||
versions[name] = new(big.Int).SetUint64(uint64(version)).FillBytes(make([]byte, 4))
|
||||
case int64:
|
||||
versions[name] = new(big.Int).SetUint64(uint64(version)).FillBytes(make([]byte, 4))
|
||||
case uint64:
|
||||
versions[name] = new(big.Int).SetUint64(version).FillBytes(make([]byte, 4))
|
||||
case string:
|
||||
|
|
@ -125,6 +127,8 @@ func (c *ChainConfig) LoadForks(file []byte) error {
|
|||
switch epoch := value.(type) {
|
||||
case int:
|
||||
epochs[name] = uint64(epoch)
|
||||
case int64:
|
||||
epochs[name] = uint64(epoch)
|
||||
case uint64:
|
||||
epochs[name] = epoch
|
||||
case string:
|
||||
|
|
|
|||
Loading…
Reference in a new issue