mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
7bc22e4ddf
* Add sync committee index cache * Update BUILD.bazel Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
33 lines
994 B
Go
33 lines
994 B
Go
// +build libfuzzer
|
|
|
|
package cache
|
|
|
|
import (
|
|
types "github.com/prysmaticlabs/eth2-types"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state"
|
|
)
|
|
|
|
// FakeSyncCommitteeCache is a fake `SyncCommitteeCache` to satisfy fuzzing.
|
|
type FakeSyncCommitteeCache struct {
|
|
}
|
|
|
|
// NewSyncCommittee initializes and returns a new SyncCommitteeCache.
|
|
func NewSyncCommittee() *FakeSyncCommitteeCache {
|
|
return &FakeSyncCommitteeCache{}
|
|
}
|
|
|
|
// CurrentEpochIndexPosition -- fake.
|
|
func (s *FakeSyncCommitteeCache) CurrentPeriodIndexPosition(root [32]byte, valIdx types.ValidatorIndex) ([]types.CommitteeIndex, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// NextEpochIndexPosition -- fake.
|
|
func (s *FakeSyncCommitteeCache) NextPeriodIndexPosition(root [32]byte, valIdx types.ValidatorIndex) ([]types.CommitteeIndex, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// UpdatePositionsInCommittee -- fake.
|
|
func (s *FakeSyncCommitteeCache) UpdatePositionsInCommittee(syncCommitteeBoundaryRoot [32]byte, state state.BeaconStateAltair) error {
|
|
return nil
|
|
}
|