Skip to content
Snippets Groups Projects
Commit 6e5de435 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Fix tests but maintain the message hash sanity check in the message buffer deserialization code

parent 6ee73b31
No related branches found
No related tags found
2 merge requests!510Release,!455Only use Msg and Recipient fields when hashing a message
...@@ -309,10 +309,10 @@ func (mb *MessageBuffer) Next() (interface{}, bool) { ...@@ -309,10 +309,10 @@ func (mb *MessageBuffer) Next() (interface{}, bool) {
"reliability: %v", h, err) "reliability: %v", h, err)
} }
mhash := mb.handler.HashMessage(m) if m != nil && h != mb.handler.HashMessage(m) {
if mhash != h { jww.WARN.Printf("MessageHash mismatch, possible"+
jww.ERROR.Printf("MessageHash mismatch:\n%v\n%v", " deserialization failure: %v != %v",
mhash, h) mb.handler.HashMessage(m), h)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment