diff --git a/channels/sendTracker.go b/channels/sendTracker.go index 023785fa7f4063b6dc30e509419cd79f7978fab4..437340a518d723591701fcf9296af96576b10c75 100644 --- a/channels/sendTracker.go +++ b/channels/sendTracker.go @@ -106,7 +106,7 @@ func loadSendTracker(net Client, kv *versioned.KV, trigger triggerEventFunc, st.unsent = make(map[uint64]*tracked) //register to check all outstanding rounds when the network becomes healthy - /*var callBackID uint64 + var callBackID uint64 callBackID = net.AddHealthCallback(func(f bool) { if !f { return @@ -120,7 +120,7 @@ func loadSendTracker(net Client, kv *versioned.KV, trigger triggerEventFunc, } st.net.GetRoundResults(getRoundResultsTimeout, rr.callback, rr.round) } - })*/ + }) return st } @@ -337,19 +337,19 @@ func (st *sendTracker) handleSend(uuid uint64, t.RoundID = round.ID //add the roundID - roundsList, _ := st.byRound[round.ID] + roundsList, existsRound := st.byRound[round.ID] st.byRound[round.ID] = append(roundsList, t) //add the round st.byMessageID[messageID] = t - /*if !existsRound { + if !existsRound { rr := &roundResults{ round: round.ID, st: st, } st.net.GetRoundResults(getRoundResultsTimeout, rr.callback, rr.round) - }*/ + } delete(st.unsent, uuid) @@ -486,12 +486,11 @@ func (rr *roundResults) callback(allRoundsSucceeded, timedOut bool, results map[ } rr.st.mux.Unlock() - - for i := range registered { - round := results[rr.round].Round - ts := mutateTimestamp(round.Timestamps[states.QUEUED], registered[i].MsgID) - go rr.st.updateStatus(registered[i].UUID, registered[i].MsgID, ts, - round, status) + if status == Failed { + for i := range registered { + round := results[rr.round].Round + go rr.st.updateStatus(registered[i].UUID, registered[i].MsgID, time.Time{}, + round, Failed) + } } - } diff --git a/cmix/nodes/request.go b/cmix/nodes/request.go index 978cd01a33fb6df3ecf05de7459f35b19d4dad9b..abee1dfff97fb6621bc7079635332de833f82e00 100644 --- a/cmix/nodes/request.go +++ b/cmix/nodes/request.go @@ -199,7 +199,7 @@ func processRequestResponse(signedKeyResponse *pb.SignedKeyResponse, sessionKey := registration.GenerateBaseKey(grp, nodeDHPub, dhPrivKey, h) - jww.INFO.Printf("DH for reg took %s", time.Since(start)) + jww.TRACE.Printf("DH for reg took %s", time.Since(start)) // Verify the HMAC if !registration.VerifyClientHMAC(sessionKey.Bytes(),