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

Merge branch 'release' of gitlab.com:elixxir/client into et/RegTimestamp

parents 34f687e4 ad3714b7
No related branches found
No related tags found
1 merge request!23Release
......@@ -55,17 +55,20 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader,
//lookup if an ongoing request is occurring
rqType, sr, _, err := storage.Auth().GetRequest(partner.ID)
if err != nil && !strings.Contains(err.Error(), auth.NoRequest){
if err == nil {
if rqType == auth.Receive {
return 0, errors.WithMessage(err,
"Cannot send a request after receiving a request")
return 0, errors.Errorf("Cannot send a request after " +
"receiving a request")
} else if rqType == auth.Sent {
resend = true
}else{
return 0, errors.WithMessage(err,
"Cannot send a request after receiving unknown error " +
"on requesting contact status")
return 0, errors.Errorf("Cannot send a request after " +
" a stored request with unknown rqType: %d", rqType)
}
}else if !strings.Contains(err.Error(), auth.NoRequest){
return 0, errors.WithMessage(err,
"Cannot send a request after receiving unknown error " +
"on requesting contact status")
}
grp := storage.E2e().GetGroup()
......
......@@ -34,7 +34,7 @@ type sendCmixCommsInterface interface {
}
// 1.5 seconds
const sendTimeBuffer = 1500 * time.Millisecond
const sendTimeBuffer = 2500 * time.Millisecond
// WARNING: Potentially Unsafe
// Public manager function to send a message over CMIX
......
......@@ -82,7 +82,7 @@ func (m *Manager) SendUnsafe(msg message.Send, param params.Unsafe) ([]id.Round,
return nil, errors.Errorf("Failed to send %v/%v sub payloads:"+
" %s", numFail, len(partitions), errRtn)
} else {
jww.INFO.Printf("Sucesfully Unsafe sent %d/%d to %s",
jww.INFO.Printf("Successfully Unsafe sent %d/%d to %s",
len(partitions)-numFail, len(partitions), msg.Recipient)
}
......
......@@ -21,6 +21,7 @@ const (
const (
bsBuffLengthErr = "length of buffer %d != %d expected"
bsKvSaveErr = "failed to save blockStore to KV: %+v"
bsKvInitSaveErr = "failed to save initial block: %+v"
bsKvLoadErr = "failed to get BlockStore from storage: %+v"
bsKvUnmarshalErr = "failed to unmarshal BlockStore loaded from storage: %+v"
bJsonMarshalErr = "failed to JSON marshal block %d: %+v"
......@@ -218,6 +219,12 @@ func (bs *BlockStore) save() error {
return errors.Errorf(bsKvSaveErr, err)
}
// Save initial block
err = bs.saveBlock()
if err != nil {
return errors.Errorf(bsKvInitSaveErr, err)
}
return nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment