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
27 lines
724 B
Go
27 lines
724 B
Go
package kv
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
|
|
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
)
|
|
|
|
// State retrieval by filter criteria.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) State(ctx context.Context, f *filters.QueryFilter) (*pb.BeaconState, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// HeadState returns the latest canonical state in eth2.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) HeadState(ctx context.Context) (*pb.BeaconState, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// SaveState stores a state to the db by the block root which triggered it.
|
|
// TODO(#3164): Implement.
|
|
func (k *Store) SaveState(ctx context.Context, state *pb.BeaconState, blockRoot [32]byte) error {
|
|
return nil
|
|
}
|