mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
Revert grpc error in db package (#2076)
* Revert "status err code" This reverts commit 27112ff2841ae7ccfb7d7eca665e06bbad81755d. * imports
This commit is contained in:
parent
699a8e9087
commit
ec41d37cf4
@ -32,8 +32,6 @@ go_library(
|
||||
"@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
"@io_opencensus_go//trace:go_default_library",
|
||||
"@org_golang_google_grpc//codes:go_default_library",
|
||||
"@org_golang_google_grpc//status:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -7,8 +7,6 @@ import (
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
"github.com/prysmaticlabs/prysm/shared/hashutil"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// SaveValidatorIndex accepts a public key and validator index and writes them to disk.
|
||||
@ -41,7 +39,7 @@ func (db *BeaconDB) SaveValidatorIndexBatch(pubKey []byte, index int) error {
|
||||
// ValidatorIndex accepts a public key and returns the corresponding validator index.
|
||||
func (db *BeaconDB) ValidatorIndex(pubKey []byte) (uint64, error) {
|
||||
if !db.HasValidator(pubKey) {
|
||||
return 0, status.Error(codes.NotFound, fmt.Sprintf("validator %#x does not exist", pubKey))
|
||||
return 0, fmt.Errorf("validator %#x does not exist", pubKey)
|
||||
}
|
||||
|
||||
var index uint64
|
||||
|
Loading…
Reference in New Issue
Block a user