diff --git a/storage/session.go b/storage/session.go index e54ab01fbc4a2002bac5ffa445d906ffd8710186..9273e759035711bbfc2f858228840e157923d511 100644 --- a/storage/session.go +++ b/storage/session.go @@ -14,6 +14,7 @@ import ( "gitlab.com/elixxir/client/storage/hostList" "gitlab.com/elixxir/client/storage/rounds" "gitlab.com/xx_network/primitives/rateLimiting" + "math/rand" "sync" "testing" "time" @@ -486,6 +487,19 @@ func InitTestingSession(i interface{}) *Session { s.hostList = hostList.NewStore(s.kv) + grp := cyclic.NewGroup(large.NewInt(173), large.NewInt(2)) + privKeys := make([]*cyclic.Int, 10) + pubKeys := make([]*cyclic.Int, 10) + for i := range privKeys { + privKeys[i] = grp.NewInt(rand.Int63n(172)) + pubKeys[i] = grp.ExpG(privKeys[i], grp.NewInt(1)) + } + + s.auth, err = auth.NewStore(s.kv, grp, privKeys) + if err != nil { + jww.FATAL.Panicf("Failed to create auth store: %v", err) + } + s.edgeCheck, err = edge.NewStore(s.kv, uid) if err != nil { jww.FATAL.Panicf("Failed to create new edge Store: %+v", err)