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.
|
// mark the message as invalid and penalize peers that have already forwarded it.
|
||||||
drec.status = deliveryInvalid
|
drec.status = deliveryInvalid
|
||||||
|
|
||||||
|
ps.markInvalidMessageDelivery(msg.ReceivedFrom, msg)
|
||||||
for p := range drec.peers {
|
for p := range drec.peers {
|
||||||
ps.markInvalidMessageDelivery(p, msg)
|
ps.markInvalidMessageDelivery(p, msg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue