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

Merge remote-tracking branch 'origin/channelLogging' into channelLogging

parents 62235260 c2872c04
No related branches found
No related tags found
3 merge requests!510Release,!427Modify send code to use a debug tag that includes a msgDigest. This is set by...,!340Project/channels
......@@ -10,6 +10,9 @@ package bindings
import (
"crypto/ed25519"
"encoding/json"
"sync"
"time"
"github.com/pkg/errors"
"gitlab.com/elixxir/client/channels"
"gitlab.com/elixxir/client/cmix/rounds"
......@@ -21,8 +24,6 @@ import (
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"gitlab.com/xx_network/primitives/netTime"
"sync"
"time"
)
////////////////////////////////////////////////////////////////////////////////
......@@ -805,10 +806,13 @@ func (cm *ChannelsManager) SendGeneric(marshalledChanId []byte,
return nil, err
}
msgTy := channels.MessageType(messageType)
msgDigest := channels.MakeChanMsgDigest(chanId, msgTy, message)
// Send message
chanMsgId, rnd, ephId, err := cm.api.SendGeneric(chanId,
channels.MessageType(messageType), message,
time.Duration(leaseTimeMS), params.CMIX)
msgTy, message, time.Duration(leaseTimeMS),
msgDigest, params.CMIX)
if err != nil {
return nil, err
}
......@@ -859,10 +863,13 @@ func (cm *ChannelsManager) SendAdminGeneric(adminPrivateKey,
return nil, err
}
msgTy := channels.MessageType(messageType)
msgDigest := channels.MakeChanMsgDigest(chanId, msgTy, message)
// Send admin message
chanMsgId, rnd, ephId, err := cm.api.SendAdminGeneric(rsaPrivKey,
chanId, channels.MessageType(messageType), message,
time.Duration(leaseTimeMS), params.CMIX)
chanId, msgTy, message, time.Duration(leaseTimeMS),
msgDigest, params.CMIX)
// Construct send report
return constructChannelSendReport(chanMsgId, rnd.ID, ephId)
......
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