diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..8adfd3c --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: # This can be anything, but it needs to exist as the name + # basic settings + target: auto + threshold: 5% + base: auto \ No newline at end of file diff --git a/libp2p/protocols/pubsub/floodsub.nim b/libp2p/protocols/pubsub/floodsub.nim index 137c792..295997e 100644 --- a/libp2p/protocols/pubsub/floodsub.nim +++ b/libp2p/protocols/pubsub/floodsub.nim @@ -87,8 +87,11 @@ method rpcHandler*(f: FloodSub, let validation = await f.validate(msg) case validation - of ValidationResult.Reject, ValidationResult.Ignore: - debug "Dropping message due to ignored validation", msgId, peer + of ValidationResult.Reject: + debug "Dropping message after validation, reason: reject", msgId, peer + continue + of ValidationResult.Ignore: + debug "Dropping message after validation, reason: ignore", msgId, peer continue of ValidationResult.Accept: discard diff --git a/libp2p/protocols/pubsub/gossipsub.nim b/libp2p/protocols/pubsub/gossipsub.nim index dd761cf..4bbd65d 100644 --- a/libp2p/protocols/pubsub/gossipsub.nim +++ b/libp2p/protocols/pubsub/gossipsub.nim @@ -1109,11 +1109,11 @@ method rpcHandler*(g: GossipSub, let validation = await g.validate(msg) case validation of ValidationResult.Reject: - debug "Dropping message due to failed validation", msgId, peer + debug "Dropping message after validation, reason: reject", msgId, peer g.punishPeer(peer, msg.topicIDs) continue of ValidationResult.Ignore: - debug "Dropping message due to ignored validation", msgId, peer + debug "Dropping message after validation, reason: ignore", msgId, peer continue of ValidationResult.Accept: discard diff --git a/libp2p/protocols/pubsub/gossipsub10.nim b/libp2p/protocols/pubsub/gossipsub10.nim index 47c542f..9d828f9 100644 --- a/libp2p/protocols/pubsub/gossipsub10.nim +++ b/libp2p/protocols/pubsub/gossipsub10.nim @@ -466,8 +466,11 @@ method rpcHandler*(g: GossipSub, let validation = await g.validate(msg) case validation - of ValidationResult.Reject, ValidationResult.Ignore: - debug "Dropping message due to ignored validation", msgId, peer + of ValidationResult.Reject: + debug "Dropping message after validation, reason: reject", msgId, peer + continue + of ValidationResult.Ignore: + debug "Dropping message after validation, reason: ignore", msgId, peer continue of ValidationResult.Accept: discard