mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
dce9c41094
* 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
45 lines
1.2 KiB
Go
45 lines
1.2 KiB
Go
package kv
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
|
|
)
|
|
|
|
// Attestation retrieval by root.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) Attestation(ctx context.Context, attRoot [32]byte) (*ethpb.Attestation, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// Attestations retrieves a list of attestations by filter criteria.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) Attestations(ctx context.Context, f *filters.QueryFilter) ([]*ethpb.Attestation, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// HasAttestation checks if an attestation by root exists in the db.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) HasAttestation(ctx context.Context, attRoot [32]byte) bool {
|
|
return false
|
|
}
|
|
|
|
// DeleteAttestation by root.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) DeleteAttestation(ctx context.Context, attRoot [32]byte) error {
|
|
return nil
|
|
}
|
|
|
|
// SaveAttestation to the db.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) SaveAttestation(ctx context.Context, att *ethpb.Attestation) error {
|
|
return nil
|
|
}
|
|
|
|
// SaveAttestations via batch updates to the db.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) SaveAttestations(ctx context.Context, atts []*ethpb.Attestation) error {
|
|
return nil
|
|
}
|