diff --git a/http/base/rest/interfaces.go b/http/base/rest/interfaces.go index 7174153684..015ec1c917 100644 --- a/http/base/rest/interfaces.go +++ b/http/base/rest/interfaces.go @@ -571,7 +571,7 @@ 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) } @@ -579,7 +579,7 @@ func GetShardChainConfig(cmd map[string]interface{}) map[string]interface{} { 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) } diff --git a/http/base/rpc/interfaces.go b/http/base/rpc/interfaces.go index 0664379f86..591729d9d1 100644 --- a/http/base/rpc/interfaces.go +++ b/http/base/rpc/interfaces.go @@ -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, "") }