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

Working reception

parent 68b59833
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ func (c *Client) SendUnsafe(m message.Send, param params.Unsafe) ([]id.Round, ...@@ -37,7 +37,7 @@ func (c *Client) SendUnsafe(m message.Send, param params.Unsafe) ([]id.Round,
// if it fails. // if it fails.
func (c *Client) SendCMIX(msg format.Message, param params.CMIX) (id.Round, func (c *Client) SendCMIX(msg format.Message, param params.CMIX) (id.Round,
error) { error) {
jww.INFO.Printf("SendCMIX(%v)", msg) jww.INFO.Printf("SendCMIX(%s)", string(msg.GetContents()))
return c.network.SendCMIX(msg, param) return c.network.SendCMIX(msg, param)
} }
......
...@@ -178,7 +178,8 @@ var rootCmd = &cobra.Command{ ...@@ -178,7 +178,8 @@ var rootCmd = &cobra.Command{
done = true done = true
break break
case m := <-recvCh: case m := <-recvCh:
fmt.Printf("Message received: %v", m) fmt.Printf("Message received: %s", string(
m.Payload))
break break
} }
} }
......
...@@ -62,7 +62,7 @@ var followCnt int = 0 ...@@ -62,7 +62,7 @@ var followCnt int = 0
// executes each iteration of the follower // executes each iteration of the follower
func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
jww.INFO.Printf("follow: %d", followCnt) jww.TRACE.Printf("follow: %d", followCnt)
followCnt++ followCnt++
//randomly select a gateway to poll //randomly select a gateway to poll
...@@ -148,8 +148,4 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -148,8 +148,4 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
// messages for the user (bloom not implemented yet) // messages for the user (bloom not implemented yet)
checkedRounds.RangeUncheckedMasked(gwRoundsState, roundChecker, checkedRounds.RangeUncheckedMasked(gwRoundsState, roundChecker,
int(m.param.MaxCheckedRounds)) int(m.param.MaxCheckedRounds))
wr := m.Instance.GetWaitingRounds()
jww.INFO.Printf("WaitingRounds: %+v, %d", wr.GetSlice(), wr.Len())
} }
...@@ -62,6 +62,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message) { ...@@ -62,6 +62,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message) {
} else { } else {
// if it doesnt match any form of encrypted, hear it as a raw message // if it doesnt match any form of encrypted, hear it as a raw message
// and add it to garbled messages to be handled later // and add it to garbled messages to be handled later
msg = ecrMsg
raw := message.Receive{ raw := message.Receive{
Payload: msg.GetRawContents(), Payload: msg.GetRawContents(),
MessageType: message.Raw, MessageType: message.Raw,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment