prysm-pulse/beacon-chain/db/kv/validators.go
Raul Jordan dce9c41094 Define Interface Stubs for New DB Interface (#3164)
* begin db interface

* define the database interface

* interface definition simplifications

* include latest message proto

* modify pbs

* rem kv folder

* add filter interface

* lint

* ctx package is great

* interface getting better

* ctx everywhere...it's everywhere!

* block roots method

* new kv store initialization

* comments

* gaz

* implement interface

* refactor for proper naming conventions

* add todos

* proper comments

* rem unused
2019-08-10 20:50:10 -04:00

50 lines
1.5 KiB
Go

package kv
import (
"context"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
)
// ValidatorLatestVote retrieval by validator index.
// TODO(#3164): Implement.
func (k *Store) ValidatorLatestVote(ctx context.Context, validatorIdx uint64) (*pb.ValidatorLatestVote, error) {
return nil, nil
}
// HasValidatorLatestVote verifies if a validator index has a latest vote stored in the db.
// TODO(#3164): Implement.
func (k *Store) HasValidatorLatestVote(ctx context.Context, validatorIdx uint64) bool {
return false
}
// SaveValidatorLatestVote by validator index.
// TODO(#3164): Implement.
func (k *Store) SaveValidatorLatestVote(ctx context.Context, validatorIdx uint64, vote *pb.ValidatorLatestVote) error {
return nil
}
// ValidatorIndex by public key.
// TODO(#3164): Implement.
func (k *Store) ValidatorIndex(ctx context.Context, publicKey [48]byte) (uint64, error) {
return 0, nil
}
// HasValidatorIndex verifies if a validator's index by public key exists in the db.
// TODO(#3164): Implement.
func (k *Store) HasValidatorIndex(ctx context.Context, publicKey [48]byte) bool {
return false
}
// DeleteValidatorIndex clears a validator index from the db by the validator's public key.
// TODO(#3164): Implement.
func (k *Store) DeleteValidatorIndex(ctx context.Context, publicKey [48]byte) error {
return nil
}
// SaveValidatorIndex by public key in the db.
// TODO(#3164): Implement.
func (k *Store) SaveValidatorIndex(ctx context.Context, publicKey [48]byte, validatorIdx uint64) error {
return nil
}