Skip to content
Snippets Groups Projects
Commit 2b011c28 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

moved e2e and finalized the context object

parent f2873774
No related branches found
No related tags found
No related merge requests found
package context
import (
"gitlab.com/elixxir/client/storage"
"gitlab.com/elixxir/primitives/switchboard"
)
type Context struct {
Session *storage.Session
Switchboard *switchboard.Switchboard
// note that the manager has a pointer to the context in many cases, but
// this interface allows it to be mocked for easy testing without the
// loop
Manager NetworkManager
}
package context
import "gitlab.com/xx_network/primitives/id"
type Message struct {
Recipient *id.ID
Payload []byte
MessageType int32
}
package context
import (
"gitlab.com/elixxir/comms/network"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/primitives/id"
)
type NetworkManager interface {
SendE2E(m Message) ([]id.Round, error)
SendUnsafe(m Message) ([]id.Round, error)
SendCMIX(message format.Message) (id.Round, error)
GetRekeyChan() chan id.ID
GetInstance() *network.Instance
//placeholder to stop active threads
Kill() bool
}
package key
package e2e
import (
"gitlab.com/elixxir/client/storage"
......
package key
package e2e
type fingerprintAccess interface {
// Receives a list of fingerprints to add. Overrides on collision.
......
package key
package e2e
import (
"github.com/pkg/errors"
......
package key
package e2e
import (
"bytes"
......
package key
package e2e
import (
"github.com/pkg/errors"
......
package key
package e2e
import "gitlab.com/elixxir/crypto/e2e"
......
package key
package e2e
// Testing file for the params.go functions
......
package key
package e2e
import (
"encoding/json"
......
package key
package e2e
import (
"encoding/base64"
......
package key
package e2e
import "encoding/base64"
......
package key
package e2e
type SessionType uint8
......
package key
package e2e
import (
"math"
......
package key
package e2e
import (
"gitlab.com/elixxir/client/storage"
......
package key
package e2e
import (
"encoding/json"
......@@ -8,6 +8,8 @@ import (
"time"
)
const currentStateVectorVersion = 0
type stateVector struct {
ctx *context
key string
......@@ -75,7 +77,7 @@ func (sv *stateVector) save() error {
}
obj := storage.VersionedObject{
Version: currentSessionVersion,
Version: currentStateVectorVersion,
Timestamp: now,
Data: data,
}
......
package key
package e2e
import (
"fmt"
......
package key
package e2e
import "fmt"
......
package key
package e2e
// Testing file for the status.go functions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment