mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 04:54:05 -05:00
Pending aggregates: When multiple aggregated attestations only differing by the aggregator index are in the pending queue, only process one of them.
This commit is contained in:
@@ -402,9 +402,6 @@ func pendingAggregatesAreEqual(a, b ethpb.SignedAggregateAttAndProof) bool {
|
|||||||
if a.Version() != b.Version() {
|
if a.Version() != b.Version() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if a.AggregateAttestationAndProof().GetAggregatorIndex() != b.AggregateAttestationAndProof().GetAggregatorIndex() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
aAtt := a.AggregateAttestationAndProof().AggregateVal()
|
aAtt := a.AggregateAttestationAndProof().AggregateVal()
|
||||||
bAtt := b.AggregateAttestationAndProof().AggregateVal()
|
bAtt := b.AggregateAttestationAndProof().AggregateVal()
|
||||||
if aAtt.GetData().Slot != bAtt.GetData().Slot {
|
if aAtt.GetData().Slot != bAtt.GetData().Slot {
|
||||||
|
|||||||
@@ -918,11 +918,6 @@ func Test_pendingAggregatesAreEqual(t *testing.T) {
|
|||||||
b := ðpb.SignedAggregateAttestationAndProofElectra{Message: ðpb.AggregateAttestationAndProofElectra{AggregatorIndex: 1}}
|
b := ðpb.SignedAggregateAttestationAndProofElectra{Message: ðpb.AggregateAttestationAndProofElectra{AggregatorIndex: 1}}
|
||||||
assert.Equal(t, false, pendingAggregatesAreEqual(a, b))
|
assert.Equal(t, false, pendingAggregatesAreEqual(a, b))
|
||||||
})
|
})
|
||||||
t.Run("different aggregator index", func(t *testing.T) {
|
|
||||||
a := ðpb.SignedAggregateAttestationAndProof{Message: ðpb.AggregateAttestationAndProof{AggregatorIndex: 1}}
|
|
||||||
b := ðpb.SignedAggregateAttestationAndProof{Message: ðpb.AggregateAttestationAndProof{AggregatorIndex: 2}}
|
|
||||||
assert.Equal(t, false, pendingAggregatesAreEqual(a, b))
|
|
||||||
})
|
|
||||||
t.Run("different slot", func(t *testing.T) {
|
t.Run("different slot", func(t *testing.T) {
|
||||||
a := ðpb.SignedAggregateAttestationAndProof{
|
a := ðpb.SignedAggregateAttestationAndProof{
|
||||||
Message: ðpb.AggregateAttestationAndProof{
|
Message: ðpb.AggregateAttestationAndProof{
|
||||||
|
|||||||
Reference in New Issue
Block a user