mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Use Target Epoch to Determine Indexed Attestations for Slasher (#5085)
* no more head fetchre * no need for head fetcher * nil checks
This commit is contained in:
parent
ed7ad4525e
commit
c6acf0a28c
@ -277,7 +277,14 @@ func (bs *Server) StreamIndexedAttestations(
|
||||
err,
|
||||
)
|
||||
}
|
||||
epoch := helpers.SlotToEpoch(bs.HeadFetcher.HeadSlot())
|
||||
if len(aggAtts) == 0 {
|
||||
continue
|
||||
}
|
||||
// All attestations we receive have the same target epoch given they
|
||||
// have the same data root, so we just use the target epoch from
|
||||
// the first one to determine committees for converting into indexed
|
||||
// form.
|
||||
epoch := aggAtts[0].Data.Target.Epoch
|
||||
committeesBySlot, _, err := bs.retrieveCommitteesForEpoch(stream.Context(), epoch)
|
||||
if err != nil {
|
||||
return status.Errorf(
|
||||
|
Loading…
Reference in New Issue
Block a user