mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
a069738c20
* update shared/params * update eth2-types deps * update protobufs * update shared/* * fix testutil/state * update beacon-chain/state * update beacon-chain/db * update tests * fix test * update beacon-chain/core * update beacon-chain/blockchain * update beacon-chain/cache * beacon-chain/forkchoice * update beacon-chain/operations * update beacon-chain/p2p * update beacon-chain/rpc * update sync/initial-sync * update deps * update deps * go fmt * update beacon-chain/sync * update endtoend/ * bazel build //beacon-chain - works w/o issues * update slasher code * udpate tools/ * update validator/ * update fastssz * fix build * fix test building * update tests * update ethereumapis deps * fix tests * update state/stategen * fix build * fix test * add FarFutureSlot * go imports * Radek's suggestions * Ivan's suggestions * type conversions * Nishant's suggestions * add more tests to rpc_send_request * fix test * clean up * fix conflicts Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: nisdas <nishdas93@gmail.com>
53 lines
1.9 KiB
Go
53 lines
1.9 KiB
Go
// +build libfuzzer
|
|
|
|
// This file is used in fuzzer builds to bypass global committee caches.
|
|
package cache
|
|
|
|
import types "github.com/prysmaticlabs/eth2-types"
|
|
|
|
// FakeCommitteeCache is a struct with 1 queue for looking up shuffled indices list by seed.
|
|
type FakeCommitteeCache struct {
|
|
}
|
|
|
|
// NewCommitteesCache creates a new committee cache for storing/accessing shuffled indices of a committee.
|
|
func NewCommitteesCache() *FakeCommitteeCache {
|
|
return &FakeCommitteeCache{}
|
|
}
|
|
|
|
// Committee fetches the shuffled indices by slot and committee index. Every list of indices
|
|
// represent one committee. Returns true if the list exists with slot and committee index. Otherwise returns false, nil.
|
|
func (c *FakeCommitteeCache) Committee(slot types.Slot, seed [32]byte, index uint64) ([]uint64, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// AddCommitteeShuffledList adds Committee shuffled list object to the cache. T
|
|
// his method also trims the least recently list if the cache size has ready the max cache size limit.
|
|
func (c *FakeCommitteeCache) AddCommitteeShuffledList(committees *Committees) error {
|
|
return nil
|
|
}
|
|
|
|
// AddProposerIndicesList updates the committee shuffled list with proposer indices.
|
|
func (c *FakeCommitteeCache) AddProposerIndicesList(seed [32]byte, indices []uint64) error {
|
|
return nil
|
|
}
|
|
|
|
// ActiveIndices returns the active indices of a given seed stored in cache.
|
|
func (c *FakeCommitteeCache) ActiveIndices(seed [32]byte) ([]uint64, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// ActiveIndicesCount returns the active indices count of a given seed stored in cache.
|
|
func (c *FakeCommitteeCache) ActiveIndicesCount(seed [32]byte) (int, error) {
|
|
return 0, nil
|
|
}
|
|
|
|
// ProposerIndices returns the proposer indices of a given seed.
|
|
func (c *FakeCommitteeCache) ProposerIndices(seed [32]byte) ([]uint64, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// HasEntry returns true if the committee cache has a value.
|
|
func (c *FakeCommitteeCache) HasEntry(string) bool {
|
|
return false
|
|
}
|