mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
3edfa8cb88
* Use ValidtorIndex across Prysm. Build ok * First take at fixing tests * Clean up e2e, fuzz... etc * Fix new lines * Update beacon-chain/cache/proposer_indices_test.go Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update beacon-chain/core/helpers/rewards_penalties.go Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update beacon-chain/core/helpers/shuffle.go Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update validator/graffiti/parse_graffiti_test.go Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Raul's feedback * Fix downcast int -> uint64 * Victor's feedback Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
// +build libfuzzer
|
|
|
|
// This file is used in fuzzer builds to bypass proposer indices caches.
|
|
package cache
|
|
|
|
import types "github.com/prysmaticlabs/eth2-types"
|
|
|
|
// 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) ([]types.ValidatorIndex, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// HasProposerIndices returns the proposer indices of a block root seed.
|
|
func (c *FakeProposerIndicesCache) HasProposerIndices(r [32]byte) (bool, error) {
|
|
return false, nil
|
|
}
|