Skip to content
Snippets Groups Projects
Commit 436fc20f authored by David Stainton's avatar David Stainton
Browse files

WIP

parent df32e981
No related branches found
No related tags found
6 merge requests!510Release,!419rewrote the health tracker to both consider if there are waiting rounds and...,!371[Channel RSAtoPrivate] Implement Reverse Asymmetric in Client/Broadcast,!354Channels impl,!340Project/channels,!338Xx 4055/channel identity tracking
This commit is part of merge request !354. Comments created here will be created in the context of that merge request.
......@@ -203,10 +203,12 @@ func (c *clientIDTracker) Start() (stoppable.Stoppable, error) {
}
func (c *clientIDTracker) registrationWorker(stopper *stoppable.Single) {
for {
if time.Now().After(c.registrationDisk.GetLease().Add(-graceDuration)) {
c.register()
err := c.register()
if err != nil {
jww.FATAL.Panic(err)
}
}
select {
......@@ -221,7 +223,6 @@ func (c *clientIDTracker) registrationWorker(stopper *stoppable.Single) {
return
case <-time.After(time.Second):
}
}
}
......
......@@ -71,7 +71,10 @@ func TestChannelIDTracking(t *testing.T) {
myTestClientIDTracker := newclientIDTracker(comms, host, username,
kv, m.user.GetReceptionIdentity(), ed25519.PublicKey(udPubKeyBytes), rngGen)
stopper, err := myTestClientIDTracker.Start()
//stopper, err := myTestClientIDTracker.Start()
//require.NoError(t, err)
err = myTestClientIDTracker.register()
require.NoError(t, err)
require.Equal(t, myTestClientIDTracker.GetUsername(), username)
......@@ -90,6 +93,6 @@ func TestChannelIDTracking(t *testing.T) {
//_ = myTestClientIDTracker.ValidateChannelMessage(username, lease, pubKey, authorIDSignature)
err = stopper.Close()
require.NoError(t, err)
//err = stopper.Close()
//require.NoError(t, err)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment