mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Use a cache of one entry to build attestation (#13300)
* Use a cache of one entry to build attestation * Gazelle * Enforce on RPC side * Rm unused var * Potuz feedback, dont use pointer * Fix tests * Init fetcher * Add in-progress * Add back missing lock * Potuz feedback * Update beacon-chain/rpc/prysm/v1alpha1/validator/attester_test.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> --------- Co-authored-by: Potuz <potuz@prysmaticlabs.com>
This commit is contained in:
@@ -73,6 +73,7 @@ type ChainService struct {
|
||||
BlockSlot primitives.Slot
|
||||
SyncingRoot [32]byte
|
||||
Blobs []blocks.VerifiedROBlob
|
||||
TargetRoot [32]byte
|
||||
}
|
||||
|
||||
func (s *ChainService) Ancestor(ctx context.Context, root []byte, slot primitives.Slot) ([]byte, error) {
|
||||
@@ -617,3 +618,8 @@ func (c *ChainService) ReceiveBlob(_ context.Context, b blocks.VerifiedROBlob) e
|
||||
c.Blobs = append(c.Blobs, b)
|
||||
return nil
|
||||
}
|
||||
|
||||
// TargetRootForEpoch mocks the same method in the chain service
|
||||
func (c *ChainService) TargetRootForEpoch(_ [32]byte, _ primitives.Epoch) ([32]byte, error) {
|
||||
return c.TargetRoot, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user