Skip to content
Snippets Groups Projects
Commit 05e40087 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

small debugging improvements

parent 9a5e3b12
No related branches found
No related tags found
2 merge requests!53Release,!26Protonet
...@@ -307,6 +307,7 @@ func (m *manager) follow(report interfaces.ClientErrorReport, rng csprng.Source, ...@@ -307,6 +307,7 @@ func (m *manager) follow(report interfaces.ClientErrorReport, rng csprng.Source,
jww.DEBUG.Printf("New Earliest Remaining: %d", earliestRemaining) jww.DEBUG.Printf("New Earliest Remaining: %d", earliestRemaining)
} }
bo
roundsWithMessages2 := identity.UR.Iterate(func(rid id.Round) bool { roundsWithMessages2 := identity.UR.Iterate(func(rid id.Round) bool {
if gwRoundsState.Checked(rid) { if gwRoundsState.Checked(rid) {
return rounds.Checker(rid, filterList, identity.CR) return rounds.Checker(rid, filterList, identity.CR)
......
...@@ -367,11 +367,14 @@ func (h *HostPool) replaceHostNoStore(newId *id.ID, oldPoolIndex uint32) error { ...@@ -367,11 +367,14 @@ func (h *HostPool) replaceHostNoStore(newId *id.ID, oldPoolIndex uint32) error {
h.hostMap[*newId] = oldPoolIndex h.hostMap[*newId] = oldPoolIndex
// Clean up and move onto next Host // Clean up and move onto next Host
oldHostIDStr := "unknown"
if oldHost != nil { if oldHost != nil {
oldHostIDStr = oldHost.GetId().String()
delete(h.hostMap, *oldHost.GetId()) delete(h.hostMap, *oldHost.GetId())
go oldHost.Disconnect() go oldHost.Disconnect()
} }
jww.DEBUG.Printf("Replaced Host at %d with new Host %s", oldPoolIndex,
jww.DEBUG.Printf("Replaced Host at %d [%s] with new Host %s", oldPoolIndex,oldHostIDStr,
newId.String()) newId.String())
return nil return nil
......
...@@ -197,3 +197,14 @@ func (urs *UnknownRounds) Delete() { ...@@ -197,3 +197,14 @@ func (urs *UnknownRounds) Delete() {
func (urs *UnknownRounds) unmarshal(b []byte) error { func (urs *UnknownRounds) unmarshal(b []byte) error {
return json.Unmarshal(b, &urs.rounds) return json.Unmarshal(b, &urs.rounds)
} }
func (urs *UnknownRounds) Get(round id.Round)(present bool, numchecked uint64){
urs.mux.Lock()
defer urs.mux.Unlock()
numcheck, exist := urs.rounds[round]
if !exist{
return false, 0
}
return exist, *numcheck
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment