tracer: simplify the valid Iwant logic
This commit is contained in:
parent
fa8792a65e
commit
bb92984dca
@ -609,10 +609,7 @@ func (trw *tracerWrapper) Trace(evt *pubsub_pb.TraceEvent) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check if we have any of iwant msgs (it doesn't classify per topic - just msg.ID)
|
// check if we have any of iwant msgs (it doesn't classify per topic - just msg.ID)
|
||||||
var validIwant bool = false
|
validIwant := len(iwant) > 0
|
||||||
if len(iwant) > 0 {
|
|
||||||
validIwant = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// trace the event if any of the flags was triggered
|
// trace the event if any of the flags was triggered
|
||||||
if validIhave || validIwant || validTopic {
|
if validIhave || validIwant || validTopic {
|
||||||
@ -648,10 +645,8 @@ func (trw *tracerWrapper) Trace(evt *pubsub_pb.TraceEvent) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check if there was any of the Iwant msgs
|
// check if there was any of the Iwant msgs
|
||||||
var validIwant bool = false
|
validIwant := len(iwant) > 0
|
||||||
if len(iwant) > 0 {
|
|
||||||
validIwant = true
|
|
||||||
}
|
|
||||||
// trace the msgs if any of the flags was triggered
|
// trace the msgs if any of the flags was triggered
|
||||||
if validIhave || validIwant || validTopic {
|
if validIhave || validIwant || validTopic {
|
||||||
if trw.lp2pTracer != nil {
|
if trw.lp2pTracer != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user