Skip to content
Snippets Groups Projects
Commit 9ef4717c authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Use ekv exists functionality instea of os.IsNotExist

parent e4bd47a3
No related branches found
No related tags found
2 merge requests!510Release,!282Auth Store Fixes
......@@ -11,11 +11,11 @@ import (
"bytes"
"encoding/binary"
"encoding/json"
"os"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/storage/versioned"
"gitlab.com/elixxir/crypto/e2e/auth"
"gitlab.com/elixxir/ekv"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/netTime"
)
......@@ -140,7 +140,7 @@ func (s *Store) newOrLoadPreviousNegotiations() (map[id.ID]bool, error) {
return nil, err
}
}
if os.IsNotExist(err) {
if !ekv.Exists(err) {
newPreviousNegotiations := make(map[id.ID]bool)
obj := &versioned.Object{
Version: negotiationPartnersVersion,
......
......@@ -11,7 +11,6 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"os"
"sync"
"github.com/cloudflare/circl/dh/sidh"
......@@ -20,6 +19,7 @@ import (
sidhinterface "gitlab.com/elixxir/client/interfaces/sidh"
"gitlab.com/elixxir/client/storage/versioned"
"gitlab.com/elixxir/crypto/cyclic"
"gitlab.com/elixxir/ekv"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/netTime"
......@@ -77,7 +77,7 @@ func loadSentRequest(kv *versioned.KV, partner *id.ID, grp *cyclic.Group) (*Sent
obj, err := kv.Get(srKey, currentSentRequestVersion)
// V0 Upgrade Path
if os.IsNotExist(err) {
if !ekv.Exists(err) {
obj2, err2 := kv.Get(makeOldSentRequestKey(partner), 0)
if err2 != nil {
jww.DEBUG.Printf("v0 loadSentRequest: %+v", err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment