Skip to content

Commit

Permalink
Ensure that fork version is 4 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Nov 4, 2022
1 parent f146349 commit 2fbac58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func SendHTTPRequest(ctx context.Context, client http.Client, method, url string
func ComputeDomain(domainType types.DomainType, forkVersionHex, genesisValidatorsRootHex string) (domain types.Domain, err error) {
genesisValidatorsRoot := types.Root(common.HexToHash(genesisValidatorsRootHex))
forkVersionBytes, err := hexutil.Decode(forkVersionHex)
if err != nil || len(forkVersionBytes) > 4 {
if err != nil || len(forkVersionBytes) != 4 {
return domain, errInvalidForkVersion
}
var forkVersion [4]byte
Expand Down

0 comments on commit 2fbac58

Please sign in to comment.