// Check for users with no associated ephemerals, add them if found (this should not happen unless there were issues)
orphaned,err:=nb.Storage.GetOrphanedUsers()
iferr!=nil{
jww.FATAL.Panicf("Failed to retrieve orphaned users: %+v",err)
}
iflen(orphaned)>0{
jww.WARN.Printf("Found %d orphaned users in database",len(orphaned))
}
for_,u:=rangeorphaned{
_,err:=nb.Storage.AddLatestEphemeral(u,epoch,uint(nb.inst.GetPartialNdf().Get().AddressSpace[0].Size))// TODO: is this the correct epoch? Should we do the previous one as well?
iferr!=nil{
jww.WARN.Printf("Failed to add latest ephemeral for orphaned user %+v: %+v",u.TransmissionRSAHash,err)
}
}
jww.INFO.Println(fmt.Sprintf("Sleeping until next trigger at %+v",nextTrigger))