Skip to content
Snippets Groups Projects
Commit 7d65c460 authored by Josh Brooks's avatar Josh Brooks
Browse files

Initialize auth storage in InitTestingSession

parent e3200896
No related branches found
No related tags found
2 merge requests!170Release,!143added mechanisim to replay all requests. they will replay on recept if the...
...@@ -14,6 +14,7 @@ import ( ...@@ -14,6 +14,7 @@ import (
"gitlab.com/elixxir/client/storage/hostList" "gitlab.com/elixxir/client/storage/hostList"
"gitlab.com/elixxir/client/storage/rounds" "gitlab.com/elixxir/client/storage/rounds"
"gitlab.com/xx_network/primitives/rateLimiting" "gitlab.com/xx_network/primitives/rateLimiting"
"math/rand"
"sync" "sync"
"testing" "testing"
"time" "time"
...@@ -486,6 +487,19 @@ func InitTestingSession(i interface{}) *Session { ...@@ -486,6 +487,19 @@ func InitTestingSession(i interface{}) *Session {
s.hostList = hostList.NewStore(s.kv) 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) s.edgeCheck, err = edge.NewStore(s.kv, uid)
if err != nil { if err != nil {
jww.FATAL.Panicf("Failed to create new edge Store: %+v", err) jww.FATAL.Panicf("Failed to create new edge Store: %+v", err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment