Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
xiemylogos committed Jul 30, 2019
1 parent 6291df6 commit 13fa118
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions http/base/rest/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,15 @@ func GetShardChainConfig(cmd map[string]interface{}) map[string]interface{} {
if !ok {
return ResponsePack(berr.INVALID_PARAMS)
}
id, err := strconv.ParseUint(idStr, 10, 32)
id, err := strconv.ParseUint(idStr, 10, 64)
if err != nil {
return ResponsePack(berr.INVALID_PARAMS)
}
heightStr, ok := cmd["Height"].(string)
if !ok {
return ResponsePack(berr.INVALID_PARAMS)
}
height, err := strconv.ParseInt(heightStr, 10, 64)
height, err := strconv.ParseUint(heightStr, 10, 32)
if err != nil {
return ResponsePack(berr.INVALID_PARAMS)
}
Expand Down
4 changes: 2 additions & 2 deletions http/base/rpc/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ func GetShardChainConfig(params []interface{}) map[string]interface{} {
var height uint32
switch params[0].(type) {
case float64:
id := uint32(params[0].(float64))
shardId, err := common.NewShardID(uint64(id))
id := uint64(params[0].(float64))
shardId, err := common.NewShardID(id)
if err != nil {
return responsePack(berr.INVALID_PARAMS, "")
}
Expand Down

0 comments on commit 13fa118

Please sign in to comment.