mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 04:00:05 +00:00
25 lines
906 B
Go
25 lines
906 B
Go
|
// +build libfuzzer
|
||
|
|
||
|
// This file is used in fuzzer builds to bypass proposer indices caches.
|
||
|
package cache
|
||
|
|
||
|
// FakeProposerIndicesCache is a struct with 1 queue for looking up proposer indices by root.
|
||
|
type FakeProposerIndicesCache struct {
|
||
|
}
|
||
|
|
||
|
// NewProposerIndicesCache creates a new proposer indices cache for storing/accessing proposer index assignments of an epoch.
|
||
|
func NewProposerIndicesCache() *FakeProposerIndicesCache {
|
||
|
return &FakeProposerIndicesCache{}
|
||
|
}
|
||
|
|
||
|
// AddProposerIndices adds ProposerIndices object to the cache.
|
||
|
// This method also trims the least recently list if the cache size has ready the max cache size limit.
|
||
|
func (c *FakeProposerIndicesCache) AddProposerIndices(p *ProposerIndices) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// ProposerIndices returns the proposer indices of a block root seed.
|
||
|
func (c *FakeProposerIndicesCache) ProposerIndices(r [32]byte) ([]uint64, error) {
|
||
|
return nil, nil
|
||
|
}
|