Skip to content

Commit e3b3417

Browse files
committed
Slightly rework PR #10512
1 parent ee6280e commit e3b3417

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cl/clparams/config.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ package clparams
1515

1616
import (
1717
"crypto/rand"
18-
"encoding/binary"
1918
"fmt"
2019
"math"
2120
"math/big"
@@ -24,9 +23,10 @@ import (
2423
"path"
2524
"time"
2625

26+
"gopkg.in/yaml.v2"
27+
2728
"github.com/ledgerwatch/erigon-lib/chain/networkname"
2829
libcommon "github.com/ledgerwatch/erigon-lib/common"
29-
"gopkg.in/yaml.v2"
3030

3131
"github.com/ledgerwatch/erigon/cl/utils"
3232
)
@@ -320,9 +320,7 @@ func (b ConfigByte) MarshalJSON() ([]byte, error) {
320320
type ConfigForkVersion uint32
321321

322322
func (v ConfigForkVersion) MarshalJSON() ([]byte, error) {
323-
tmp := make([]byte, 4)
324-
binary.BigEndian.PutUint32(tmp, uint32(v))
325-
return []byte(fmt.Sprintf("\"0x%x\"", tmp)), nil
323+
return []byte(fmt.Sprintf("\"0x%08x\"", v)), nil
326324
}
327325

328326
// BeaconChainConfig contains constant configs for node to participate in beacon chain.

0 commit comments

Comments
 (0)