Skip to content
Snippets Groups Projects
Commit c8e31e76 authored by Jake Taylor's avatar Jake Taylor
Browse files

go fmt and some fixes

parent 1120d1b7
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.2
gitlab.com/elixxir/comms v0.0.0-20200827170208-d1f872422b7e
gitlab.com/elixxir/comms v0.0.0-20200827193018-c0911a1a1ec0
gitlab.com/elixxir/crypto v0.0.0-20200827170914-14227f20900c
gitlab.com/elixxir/ekv v0.0.0-20200729182028-159355ea5842
gitlab.com/elixxir/primitives v0.0.0-20200827170420-5d50351f99b4
......
......@@ -169,6 +169,8 @@ gitlab.com/elixxir/comms v0.0.0-20200825195434-49150e0605d8 h1:6kwb++vm3XUf+AoR1
gitlab.com/elixxir/comms v0.0.0-20200825195434-49150e0605d8/go.mod h1:HW3Ige10aeJeyb2fcQ/YOBPiyzY/4jHau1Cj6/1WBHc=
gitlab.com/elixxir/comms v0.0.0-20200827170208-d1f872422b7e h1:BEBxLOW6yMdT53rBvxlDifsGSPYKA88K233DOpKY5Zw=
gitlab.com/elixxir/comms v0.0.0-20200827170208-d1f872422b7e/go.mod h1:HW3Ige10aeJeyb2fcQ/YOBPiyzY/4jHau1Cj6/1WBHc=
gitlab.com/elixxir/comms v0.0.0-20200827193018-c0911a1a1ec0 h1:C0P5VqrgGcTuV9kCicxakHLSUFN3qNk55O/nrBmY0fk=
gitlab.com/elixxir/comms v0.0.0-20200827193018-c0911a1a1ec0/go.mod h1:HW3Ige10aeJeyb2fcQ/YOBPiyzY/4jHau1Cj6/1WBHc=
gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4 h1:28ftZDeYEko7xptCZzeFWS1Iam95dj46TWFVVlKmw6A=
gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4/go.mod h1:ucm9SFKJo+K0N2GwRRpaNr+tKXMIOVWzmyUD0SbOu2c=
gitlab.com/elixxir/crypto v0.0.0-20200805174804-bdf909f2a16d/go.mod h1:cu6uNoANVLV0J6HyTL6KqVtVyh9SHU1RjJhytYlsbVQ=
......
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2019 Privategrity Corporation /
// Copyright © 2020 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
......@@ -39,14 +39,13 @@ func (c ChanStop) Close(timeout time.Duration) {
// structure
func StartTrackNetwork(ctx *context.Context) Stoppable {
stopper := ChanStop{
name: "TrackNetwork"
name: "TrackNetwork",
quit: make(chan bool),
}
go TrackNetwork(ctx, stopper.quit)
return stopper
}
// TrackNetwork polls the network to get updated on the state of nodes, the
// round status, and informs the client when messages can be retrieved.
func TrackNetwork(ctx *context.Context, quitCh chan bool) {
......@@ -96,7 +95,7 @@ func trackNetwork(ctx) {
func StartProcessHistoricalRounds(ctx *context.Context) Stoppable {
stopper := ChanStop{
name: "ProcessHistoricalRounds"
name: "ProcessHistoricalRounds",
quit: make(chan bool),
}
go ProcessHistoricalRounds(ctx, stopper.quit)
......@@ -217,4 +216,3 @@ func RemoveNode(ctx *context.Context, remCh chan node.ID, quitCh chan bool) {
}
}
}
......@@ -108,9 +108,8 @@ func (s *Store) Add(nid *id.ID, k *cyclic.Int) error {
return s.save()
}
// removes the key from the cmix storage object. Saves an updates node list to
//
func (s *Store) Remove(nid *id.ID, k *cyclic.Int) error {
// Remove a Node key from the nodes map and save
func (s *Store) Remove(nid *id.ID) error {
s.mux.Lock()
defer s.mux.Unlock()
......@@ -126,7 +125,7 @@ func (s *Store) Remove(nid *id.ID, k *cyclic.Int) error {
delete(s.nodes, *nid)
return nil
return s.save()
}
//Returns a RoundKeys for the topology and a list of nodes it did not have a key for
......
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
package e2e
import (
......
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
package e2e
import "gitlab.com/elixxir/crypto/e2e"
......
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
package e2e
import (
......
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
package e2e
import (
......@@ -14,7 +20,6 @@ import (
"time"
)
const currentStoreVersion = 0
const storeKey = "e2eKeyStore"
const pubKeyKey = "e2eDhPubKey"
......@@ -277,4 +282,3 @@ func (f *fingerprints) Pop(fingerprint format.Fingerprint) (*Key, error) {
return key, nil
}
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
package storage
import (
......
......@@ -36,7 +36,6 @@ type Session struct {
user *user.User
loaded bool
}
// Initialize a new Session object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment