mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 04:30:04 +00:00
Deprecate db.HeadState (#7653)
* Deprecate db.HeadState * Deprecate db.HeadState
This commit is contained in:
parent
21c5ba8ed8
commit
424488bf8a
@ -94,6 +94,8 @@ type HeadAccessDatabase interface {
|
||||
HeadBlock(ctx context.Context) (*eth.SignedBeaconBlock, error)
|
||||
SaveHeadBlockRoot(ctx context.Context, blockRoot [32]byte) error
|
||||
// State related methods.
|
||||
// Deprecated: This method may return nil. Prefer to use HighestSlotStatesBelow or
|
||||
// blockchain.HeadFetcher.HeadState().
|
||||
HeadState(ctx context.Context) (*state.BeaconState, error)
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,8 @@ func (s *Store) State(ctx context.Context, blockRoot [32]byte) (*state.BeaconSta
|
||||
}
|
||||
|
||||
// HeadState returns the latest canonical state in beacon chain.
|
||||
// Deprecated: This method may return nil. Prefer to use HighestSlotStatesBelow
|
||||
// or blockchain.HeadFetcher.HeadState().
|
||||
func (s *Store) HeadState(ctx context.Context) (*state.BeaconState, error) {
|
||||
ctx, span := trace.StartSpan(ctx, "BeaconDB.HeadState")
|
||||
defer span.End()
|
||||
|
Loading…
Reference in New Issue
Block a user