Skip to content

Commit

Permalink
chore(compat): remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanswrt committed Mar 22, 2021
1 parent 3f0681e commit 0e56028
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions resolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,6 @@ func (resolver *Resolver) QueryShards(ctx context.Context, id interface{}, param
return jsonrpc.NewResponse(id, nil, &jsonErr)
}

// pack.String(resp["state"].(map[string]interface{})["System"].(map[string]interface{})["pubKey"].(string))),
//var systemState engine.SystemState
// err = pack.Decode(systemState, resp["state"].(map[string]interface{})["System"].(pack.Struct))
// if err != nil {
// resolver.logger.Error("failed to cast to QueryShards: %v", err)
// jsonErr := jsonrpc.NewError(jsonrpc.ErrorCodeInternal, "failed compatibility conversion", nil)
// return jsonrpc.NewResponse(id, nil, &jsonErr)
// }

shards, err := v0.ShardsResponseFromSystemState(resp.State["System"])

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion testutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func ErrorResponse(id interface{}) jsonrpc.Response {
func MockSystemState() engine.SystemState {
pubkeyBytes, err := base64.URLEncoding.DecodeString("Akwn5WEMcB2Ff_E0ZOoVks9uZRvG_eFD99AysymOc5fm")
if err != nil {
panic("Shouldn't fail")
panic(fmt.Sprintf("encoding state: %v", err))
}
return engine.SystemState{
Shards: engine.SystemStateShards{
Expand Down

0 comments on commit 0e56028

Please sign in to comment.