diff --git a/bindings/dummy.go b/bindings/dummy.go index 045b950b9ec423f1550f42ec7395b6707c65c94f..51d36dac453e40dbfe222bbefa4459ab5b30feac 100644 --- a/bindings/dummy.go +++ b/bindings/dummy.go @@ -27,7 +27,7 @@ type DummyTraffic struct { // given parameters below. // // Params: -// - e2eID - e2e object ID in the tracker. +// - cmixId - a Cmix object ID in the tracker. // - maxNumMessages - the upper bound of the random number of messages sent // each sending cycle. // - avgSendDeltaMS - the average duration, in milliseconds, to wait @@ -35,11 +35,11 @@ type DummyTraffic struct { // - randomRangeMS - the upper bound of the interval between sending cycles, // in milliseconds. Sends occur every avgSendDeltaMS +/- a random duration // with an upper bound of randomRangeMS. -func NewDummyTrafficManager(e2eID, maxNumMessages, avgSendDeltaMS, +func NewDummyTrafficManager(cmixId, maxNumMessages, avgSendDeltaMS, randomRangeMS int) (*DummyTraffic, error) { // Get user from singleton - user, err := e2eTrackerSingleton.get(e2eID) + net, err := cmixTrackerSingleton.get(cmixId) if err != nil { return nil, err } @@ -48,9 +48,9 @@ func NewDummyTrafficManager(e2eID, maxNumMessages, avgSendDeltaMS, randomRange := time.Duration(randomRangeMS) * time.Millisecond m := dummy.NewManager( - maxNumMessages, avgSendDelta, randomRange, user.api.Cmix) + maxNumMessages, avgSendDelta, randomRange, net.api) - return &DummyTraffic{m}, user.api.AddService(m.StartDummyTraffic) + return &DummyTraffic{m}, net.api.AddService(m.StartDummyTraffic) } // SetStatus sets the state of the dummy traffic send thread by passing in diff --git a/dummy/send.go b/dummy/send.go index 40e8b06b2f984d8ce28aa57e2e9e8eb8d29b66f6..ffb6fed4247c16675e36e242b63fdfac355d527b 100644 --- a/dummy/send.go +++ b/dummy/send.go @@ -98,9 +98,6 @@ func (m *Manager) sendMessages(msgs map[id.ID]format.Message, rng csprng.Source) // Fill the preimage with random data to ensure it is not repeatable p := cmix.GetDefaultCMIXParams() - //Send(recipient *id.ID, fingerprint format.Fingerprint, - // service message.Service, payload, mac []byte, cmixParams CMIXParams) ( - // id.Round, ephemeral.Id, error) _, _, err := m.net.Send(&recipient, msg.GetKeyFP(), message.GetRandomService(rng), msg.GetContents(), msg.GetMac(), p) if err != nil {