Skip to content

Commit a399e53

Browse files
author
Yutong Pei
authored
api return 0 when gravity chain is not enabled (iotexproject#2110)
1 parent a3fa452 commit a399e53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/api.go

+3
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,9 @@ func (api *Server) getGravityChainStartHeight(epochHeight uint64) (uint64, error
12291229
if err != nil {
12301230
return 0, err
12311231
}
1232+
if len(data) == 0 {
1233+
return 0, nil
1234+
}
12321235
if gravityChainStartHeight, err = strconv.ParseUint(string(data), 10, 64); err != nil {
12331236
return 0, err
12341237
}

0 commit comments

Comments
 (0)