mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-22 06:23:10 +00:00
fix bug in penalties from message rejection
the first source of the invalid message was _not_ penalized!
This commit is contained in:
parent
5c1b637dce
commit
f742e5439f
2
score.go
2
score.go
@ -562,6 +562,8 @@ func (ps *peerScore) RejectMessage(msg *Message, reason string) {
|
||||
|
||||
// mark the message as invalid and penalize peers that have already forwarded it.
|
||||
drec.status = deliveryInvalid
|
||||
|
||||
ps.markInvalidMessageDelivery(msg.ReceivedFrom, msg)
|
||||
for p := range drec.peers {
|
||||
ps.markInvalidMessageDelivery(p, msg)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user