relay: add trace logs in case of msg validation rejection (#2285)

This commit is contained in:
Ivan FB 2023-12-15 13:34:30 +01:00 committed by GitHub
parent 701cb7032b
commit c9d558f878
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -202,6 +202,7 @@ proc generateOrderedValidator*(w: WakuRelay): auto {.gcsafe.} =
# see nim-libp2p protobuf library
let msgRes = WakuMessage.decode(message.data)
if msgRes.isErr():
trace "protocol generateOrderedValidator reject decode error", error=msgRes.error
return ValidationResult.Reject
let msg = msgRes.get()

View File

@ -322,6 +322,7 @@ proc generateRlnValidator*(wakuRlnRelay: WakuRLNRelay,
let decodeRes = RateLimitProof.init(message.proof)
if decodeRes.isErr():
trace "generateRlnValidator reject", error=decodeRes.error
return pubsub.ValidationResult.Reject
let msgProof = decodeRes.get()