Documentation ¶
Index ¶
- func TeardownDB(t testing.TB, db *Store)
- func TempDir() string
- type Store
- func (db *Store) AttestationHistory(ctx context.Context, publicKey []byte) (*slashpb.AttestationHistory, error)
- func (db *Store) ClearDB() error
- func (db *Store) Close() error
- func (db *Store) DatabasePath() string
- func (db *Store) DeleteAttestationHistory(ctx context.Context, pubkey []byte) error
- func (db *Store) DeleteProposalHistory(ctx context.Context, pubkey []byte) error
- func (db *Store) ProposalHistory(ctx context.Context, publicKey []byte) (*slashpb.ProposalHistory, error)
- func (db *Store) SaveAttestationHistory(ctx context.Context, pubKey []byte, ...) error
- func (db *Store) SaveProposalHistory(ctx context.Context, pubKey []byte, proposalHistory *slashpb.ProposalHistory) error
- func (db *Store) Size() (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store defines an implementation of the Prysm Database interface using BoltDB as the underlying persistent kv-store for eth2.
func NewKVStore ¶
NewKVStore initializes a new boltDB key-value store at the directory path specified, creates the kv-buckets based on the schema, and stores an open connection db object as a property of the Store struct.
func (*Store) AttestationHistory ¶
func (db *Store) AttestationHistory(ctx context.Context, publicKey []byte) (*slashpb.AttestationHistory, error)
AttestationHistory accepts a validator public key and returns the corresponding attestation history. Returns nil if there is no attestation history for the validator.
func (*Store) ClearDB ¶
ClearDB removes any previously stored data at the configured data directory.
func (*Store) DatabasePath ¶
DatabasePath at which this database writes files.
func (*Store) DeleteAttestationHistory ¶
DeleteAttestationHistory deletes the attestation history for the corresponding validator public key.
func (*Store) DeleteProposalHistory ¶
DeleteProposalHistory deletes the proposal history for the corresponding validator public key.
func (*Store) ProposalHistory ¶
func (db *Store) ProposalHistory(ctx context.Context, publicKey []byte) (*slashpb.ProposalHistory, error)
ProposalHistory accepts a validator public key and returns the corresponding proposal history. Returns nil if there is no proposal history for the validator.
func (*Store) SaveAttestationHistory ¶
func (db *Store) SaveAttestationHistory(ctx context.Context, pubKey []byte, attestationHistory *slashpb.AttestationHistory) error
SaveAttestationHistory returns the attestation history for the requested validator public key.
func (*Store) SaveProposalHistory ¶
func (db *Store) SaveProposalHistory(ctx context.Context, pubKey []byte, proposalHistory *slashpb.ProposalHistory) error
SaveProposalHistory returns the proposal history for the requested validator public key.