more logical code ordering
This commit is contained in:
parent
ca6778bc83
commit
5fa0f9ed6a
18
score.go
18
score.go
|
@ -367,6 +367,15 @@ func (ps *peerScore) Prune(p peer.ID, topic string) {
|
|||
tstats.inMesh = false
|
||||
}
|
||||
|
||||
func (ps *peerScore) ValidateMessage(msg *Message) {
|
||||
ps.Lock()
|
||||
defer ps.Unlock()
|
||||
|
||||
// the pubsub subsystem is beginning validation; create a record to track time in
|
||||
// the validation pipeline with an accurate firstSeen time.
|
||||
_ = ps.deliveries.getRecord(ps.msgID(msg.Message))
|
||||
}
|
||||
|
||||
func (ps *peerScore) DeliverMessage(msg *Message) {
|
||||
ps.Lock()
|
||||
defer ps.Unlock()
|
||||
|
@ -382,15 +391,6 @@ func (ps *peerScore) DeliverMessage(msg *Message) {
|
|||
}
|
||||
}
|
||||
|
||||
func (ps *peerScore) ValidateMessage(msg *Message) {
|
||||
ps.Lock()
|
||||
defer ps.Unlock()
|
||||
|
||||
// the pubsub subsystem is beginning validation; create a record to track time in
|
||||
// the validation pipeline with an accurate firstSeen time.
|
||||
_ = ps.deliveries.getRecord(ps.msgID(msg.Message))
|
||||
}
|
||||
|
||||
func (ps *peerScore) RejectMessage(msg *Message, reason string) {
|
||||
ps.Lock()
|
||||
defer ps.Unlock()
|
||||
|
|
Loading…
Reference in New Issue