Skip to content

Commit

Permalink
feat(gateway): debug log data I/O
Browse files Browse the repository at this point in the history
  • Loading branch information
xendarboh committed Sep 28, 2023
1 parent d4fdaf8 commit fecd5b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/xtrellis/gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ func GetMessageForClient(i *coord.RoundInfo, clientId int64) ([]byte, error) {
Data: nil,
}
message, err = packetPack(packet)
} else {
utils.DebugLog("⭐ data IN")
}

return message, err
Expand Down Expand Up @@ -275,6 +277,7 @@ func CheckFinalMessages(messages [][]byte, numExpected int) bool {
panic(err)
}
msgQueueOut.Enqueue(message)
utils.DebugLog("⭐ data OUT [%d][%d] += '%s'", p.StreamId, p.Sequence, p.Data)
}

// compare unique messages with number expected
Expand Down Expand Up @@ -307,6 +310,8 @@ func sendPacket(packet *gatewayv1.Packet) {
panic(fmt.Sprintf("[Gateway] Error creating message from packet: %v\n", err))
}

utils.DebugLog("[Gateway] Send packet!\n🔶 %v", packet)

// stage message for a mix-net client to pick it up
msgQueueIn.Enqueue(message)
}
Expand Down

0 comments on commit fecd5b3

Please sign in to comment.