erigon-pulse/cmd/lightclient/utils/bytes.go
Giulio rebuffo 3f1d5a4c92
Support for Goerli/Sepolia/Mainnet Fork ids on Consensus Layer (#5575)
* added proper chain config

* updated configs

* save progress

* fix lint

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-09-30 00:20:09 +02:00

14 lines
209 B
Go

package utils
import "encoding/binary"
func Uint32ToBytes4(n uint32) (ret [4]byte) {
binary.BigEndian.PutUint32(ret[:], n)
return
}
func BytesToBytes4(b []byte) (ret [4]byte) {
copy(ret[:], b)
return
}