Skip to content

Commit 7dfaa90

Browse files
committed
Fix Terence's comment.
1 parent df3b0da commit 7dfaa90

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

beacon-chain/sync/pending_attestations_queue_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,29 @@ func Test_pendingAggregatesAreEqual(t *testing.T) {
986986
}}}
987987
assert.Equal(t, false, pendingAggregatesAreEqual(a, b, includeAggregatorIndex))
988988
})
989+
t.Run("different aggregator index should be equal while ignoring aggregator index", func(t *testing.T) {
990+
a := &ethpb.SignedAggregateAttestationAndProof{
991+
Message: &ethpb.AggregateAttestationAndProof{
992+
AggregatorIndex: 1,
993+
Aggregate: &ethpb.Attestation{
994+
Data: &ethpb.AttestationData{
995+
Slot: 1,
996+
CommitteeIndex: 1,
997+
},
998+
AggregationBits: bitfield.Bitlist{0b1111},
999+
}}}
1000+
b := &ethpb.SignedAggregateAttestationAndProof{
1001+
Message: &ethpb.AggregateAttestationAndProof{
1002+
AggregatorIndex: 2,
1003+
Aggregate: &ethpb.Attestation{
1004+
Data: &ethpb.AttestationData{
1005+
Slot: 1,
1006+
CommitteeIndex: 1,
1007+
},
1008+
AggregationBits: bitfield.Bitlist{0b1111},
1009+
}}}
1010+
assert.Equal(t, true, pendingAggregatesAreEqual(a, b, ignoreAggregatorIndex))
1011+
})
9891012
}
9901013

9911014
func Test_pendingAttsAreEqual(t *testing.T) {

0 commit comments

Comments
 (0)