Update EthereumAPIs (#7409)

* handle unknown validator

* tests passing

* tidy
This commit is contained in:
Raul Jordan
2020-10-01 21:04:48 -05:00
committed by GitHub
parent ee747ca6d4
commit 437bab7df0
4 changed files with 10 additions and 6 deletions

View File

@@ -74,7 +74,11 @@ func (bs *Server) ListValidatorBalances(
pubkeyBytes := bytesutil.ToBytes48(pubKey)
index, ok := requestedState.ValidatorIndexByPubkey(pubkeyBytes)
if !ok {
return nil, status.Errorf(codes.NotFound, "Could not find validator index for public key %#x", pubkeyBytes)
// We continue the loop if one validator in the request is not found.
res = append(res, &ethpb.ValidatorBalances_Balance{
Status: "UNKNOWN",
})
continue
}
filtered[index] = true

View File

@@ -2552,8 +2552,8 @@ def prysm_deps():
name = "com_github_prysmaticlabs_ethereumapis",
build_file_generation = "off",
importpath = "github.com/prysmaticlabs/ethereumapis",
sum = "h1:mUAxIu2Zh+9GK+RB1Sc+T9uSveQu32SFO+d9/rOd05M=",
version = "v0.0.0-20200909190233-a9190508298e",
sum = "h1:zM15JmyZ5v6B3xqVsYe34a8IXAoklYJo6glJ5V0kXyU=",
version = "v0.0.0-20201002012750-b612cbd9e525",
)
go_repository(
name = "com_github_prysmaticlabs_go_bitfield",

2
go.mod
View File

@@ -87,7 +87,7 @@ require (
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/tsdb v0.10.0 // indirect
github.com/protolambda/zssz v0.1.5
github.com/prysmaticlabs/ethereumapis v0.0.0-20200909190233-a9190508298e
github.com/prysmaticlabs/ethereumapis v0.0.0-20201002012750-b612cbd9e525
github.com/prysmaticlabs/go-bitfield v0.0.0-20200618145306-2ae0807bef65
github.com/prysmaticlabs/go-ssz v0.0.0-20200612203617-6d5c9aa213ae
github.com/prysmaticlabs/prombbolt v0.0.0-20200324184628-09789ef63796

4
go.sum
View File

@@ -996,8 +996,8 @@ github.com/protolambda/zssz v0.1.5 h1:7fjJjissZIIaa2QcvmhS/pZISMX21zVITt49sW1oue
github.com/protolambda/zssz v0.1.5/go.mod h1:a4iwOX5FE7/JkKA+J/PH0Mjo9oXftN6P8NZyL28gpag=
github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20200922100503-3794d0d7ca25 h1:yoOj4FD6uNdWDjgZqlKGxmUYnR6tI9zN1NrE8tJ3/xE=
github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20200922100503-3794d0d7ca25/go.mod h1:FQjK3ZwD8C5DYn7ukTmFee36rq1dOMESiUfXr5RUc1w=
github.com/prysmaticlabs/ethereumapis v0.0.0-20200909190233-a9190508298e h1:mUAxIu2Zh+9GK+RB1Sc+T9uSveQu32SFO+d9/rOd05M=
github.com/prysmaticlabs/ethereumapis v0.0.0-20200909190233-a9190508298e/go.mod h1:k7b2dxy6RppCG6kmOJkNOXzRpEoTdsPygc2aQhsUsZk=
github.com/prysmaticlabs/ethereumapis v0.0.0-20201002012750-b612cbd9e525 h1:zM15JmyZ5v6B3xqVsYe34a8IXAoklYJo6glJ5V0kXyU=
github.com/prysmaticlabs/ethereumapis v0.0.0-20201002012750-b612cbd9e525/go.mod h1:k7b2dxy6RppCG6kmOJkNOXzRpEoTdsPygc2aQhsUsZk=
github.com/prysmaticlabs/go-bitfield v0.0.0-20191017011753-53b773adde52/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s=
github.com/prysmaticlabs/go-bitfield v0.0.0-20200322041314-62c2aee71669 h1:cX6YRZnZ9sgMqM5U14llxUiXVNJ3u07Res1IIjTOgtI=
github.com/prysmaticlabs/go-bitfield v0.0.0-20200322041314-62c2aee71669/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s=