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

Add debugging info to garbled message processing path

parent b7fc5441
No related branches found
No related tags found
2 merge requests!510Release,!253General Cleanup
...@@ -29,6 +29,8 @@ import ( ...@@ -29,6 +29,8 @@ import (
func (h *handler) CheckInProgressMessages() { func (h *handler) CheckInProgressMessages() {
select { select {
case h.checkInProgress <- struct{}{}: case h.checkInProgress <- struct{}{}:
jww.DEBUG.Print("[Garbled] Sent signal to check garbled " +
"message queue...")
default: default:
jww.WARN.Print("Failed to check garbled messages due to full channel.") jww.WARN.Print("Failed to check garbled messages due to full channel.")
} }
...@@ -54,16 +56,19 @@ func (h *handler) recheckInProgress() { ...@@ -54,16 +56,19 @@ func (h *handler) recheckInProgress() {
// Try to decrypt every garbled message, excising those whose counts are too // Try to decrypt every garbled message, excising those whose counts are too
// high // high
for grbldMsg, ri, identity, has := h.inProcess.Next(); has; grbldMsg, ri, identity, has = h.inProcess.Next() { for grbldMsg, ri, identity, has := h.inProcess.Next(); has; grbldMsg, ri, identity, has = h.inProcess.Next() {
bundleMsgs := []format.Message{grbldMsg}
bundle := Bundle{ bundle := Bundle{
Round: id.Round(ri.ID), Round: id.Round(ri.ID),
RoundInfo: rounds.MakeRound(ri), RoundInfo: rounds.MakeRound(ri),
Messages: []format.Message{grbldMsg}, Messages: bundleMsgs,
Finish: func() {}, Finish: func() {},
Identity: identity, Identity: identity,
} }
select { select {
case h.messageReception <- bundle: case h.messageReception <- bundle:
jww.INFO.Printf("[GARBLE] Sent %d messages to process",
len(bundleMsgs))
default: default:
jww.WARN.Printf("Failed to send bundle, channel full.") jww.WARN.Printf("Failed to send bundle, channel full.")
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment