mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
* Aggregate and pack sync committee messages * test * simplify error check * changelog <3 * fix assert import * remove parallelization * use sync committee cache * ignore bits already set in pool messages * fuzz fix * cleanup * test panic fix * clear cache in tests
43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
//go:build fuzz
|
|
|
|
package cache
|
|
|
|
import (
|
|
"github.com/OffchainLabs/prysm/v6/beacon-chain/state"
|
|
"github.com/OffchainLabs/prysm/v6/consensus-types/primitives"
|
|
)
|
|
|
|
// FakeSyncCommitteeCache is a fake `SyncCommitteeCache` to satisfy fuzzing.
|
|
type FakeSyncCommitteeCache struct {
|
|
}
|
|
|
|
// NewSyncCommittee initializes and returns a new SyncCommitteeCache.
|
|
func NewSyncCommittee() *FakeSyncCommitteeCache {
|
|
return &FakeSyncCommitteeCache{}
|
|
}
|
|
|
|
// CurrentPeriodPositions -- fake
|
|
func (s *FakeSyncCommitteeCache) CurrentPeriodPositions(root [32]byte, indices []primitives.ValidatorIndex) ([][]primitives.CommitteeIndex, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CurrentEpochIndexPosition -- fake.
|
|
func (s *FakeSyncCommitteeCache) CurrentPeriodIndexPosition(root [32]byte, valIdx primitives.ValidatorIndex) ([]primitives.CommitteeIndex, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// NextEpochIndexPosition -- fake.
|
|
func (s *FakeSyncCommitteeCache) NextPeriodIndexPosition(root [32]byte, valIdx primitives.ValidatorIndex) ([]primitives.CommitteeIndex, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// UpdatePositionsInCommittee -- fake.
|
|
func (s *FakeSyncCommitteeCache) UpdatePositionsInCommittee(syncCommitteeBoundaryRoot [32]byte, state state.BeaconState) error {
|
|
return nil
|
|
}
|
|
|
|
// Clear -- fake.
|
|
func (s *FakeSyncCommitteeCache) Clear() {
|
|
return
|
|
}
|