Skip to content

Commit feba41e

Browse files
committed
fix int bitlength issue in TestChainConfig_LoadForks
1 parent 623b2b7 commit feba41e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

beacon/params/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ func (c *ChainConfig) LoadForks(file []byte) error {
108108
switch version := value.(type) {
109109
case int:
110110
versions[name] = new(big.Int).SetUint64(uint64(version)).FillBytes(make([]byte, 4))
111+
case int64:
112+
versions[name] = new(big.Int).SetUint64(uint64(version)).FillBytes(make([]byte, 4))
111113
case uint64:
112114
versions[name] = new(big.Int).SetUint64(version).FillBytes(make([]byte, 4))
113115
case string:
@@ -125,6 +127,8 @@ func (c *ChainConfig) LoadForks(file []byte) error {
125127
switch epoch := value.(type) {
126128
case int:
127129
epochs[name] = uint64(epoch)
130+
case int64:
131+
epochs[name] = uint64(epoch)
128132
case uint64:
129133
epochs[name] = epoch
130134
case string:

0 commit comments

Comments
 (0)