2022-03-14 15:58:13 -05:00
|
|
|
//go:build fuzz
|
2021-08-05 10:44:13 -07:00
|
|
|
|
|
|
|
package cache
|
|
|
|
|
|
|
|
import (
|
2023-03-17 11:52:56 -07:00
|
|
|
"github.com/prysmaticlabs/prysm/v4/beacon-chain/state"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
|
2021-08-05 10:44:13 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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.
|
2023-01-26 15:40:12 +01:00
|
|
|
func (s *FakeSyncCommitteeCache) CurrentPeriodIndexPosition(root [32]byte, valIdx primitives.ValidatorIndex) ([]primitives.CommitteeIndex, error) {
|
2021-08-05 10:44:13 -07:00
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// NextEpochIndexPosition -- fake.
|
2023-01-26 15:40:12 +01:00
|
|
|
func (s *FakeSyncCommitteeCache) NextPeriodIndexPosition(root [32]byte, valIdx primitives.ValidatorIndex) ([]primitives.CommitteeIndex, error) {
|
2021-08-05 10:44:13 -07:00
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatePositionsInCommittee -- fake.
|
2022-05-20 22:40:03 +00:00
|
|
|
func (s *FakeSyncCommitteeCache) UpdatePositionsInCommittee(syncCommitteeBoundaryRoot [32]byte, state state.BeaconState) error {
|
2021-08-05 10:44:13 -07:00
|
|
|
return nil
|
|
|
|
}
|
2023-04-26 19:50:04 -05:00
|
|
|
|
|
|
|
// Clear -- fake.
|
|
|
|
func (s *FakeSyncCommitteeCache) Clear() {
|
|
|
|
return
|
|
|
|
}
|