Skip to content

Commit

Permalink
Caplin: Fix failing tests (#12509)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 authored Oct 28, 2024
1 parent cfd5ca1 commit d87c743
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cl/phase1/network/services/batch_signature_verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ func (b *BatchSignatureVerifier) handleIncorrectSignatures(aggregateVerification
for _, v := range aggregateVerificationData {
valid, err := blsVerifyMultipleSignatures(v.Signatures, v.SignRoots, v.Pks)
if err != nil {
if v.GossipData == nil {
continue
}
log.Warn("signature verification failed with the error: " + err.Error())
if b.sentinel != nil && v.GossipData != nil && v.GossipData.Peer != nil {
b.sentinel.BanPeer(b.ctx, v.GossipData.Peer)
Expand All @@ -161,7 +164,6 @@ func (b *BatchSignatureVerifier) handleIncorrectSignatures(aggregateVerification

// run corresponding function and publish the gossip into the network
v.F()

if b.sentinel != nil && v.GossipData != nil {
if _, err := b.sentinel.PublishGossip(b.ctx, v.GossipData); err != nil {
log.Warn("failed publish gossip", "err", err)
Expand Down

0 comments on commit d87c743

Please sign in to comment.