diff --git a/single/reception.go b/single/reception.go index 23ca6f8bef891b8ae4426fe24172d4a88c2510c5..54a415afeb7c17e58e9c933e875036ff92bbe9d2 100644 --- a/single/reception.go +++ b/single/reception.go @@ -108,5 +108,8 @@ func (m *Manager) processTransmission(msg format.Message, c := NewContact(payload.GetRID(transmitMsg.GetPubKey(grp)), transmitMsg.GetPubKey(grp), dhKey, payload.GetTagFP(), payload.GetMaxParts()) + jww.INFO.Printf("generated by singe use receiver reception id for single use: %s, " + + "ephId: %d, pubkey: %x, msg: %s", c.partner, "unknown:", transmitMsg.GetPubKey(grp), msg) + return payload.GetContents(), c, nil } diff --git a/single/transmission.go b/single/transmission.go index 25cd73276fb76eb2226ce7f44d1140cc0b9134b7..b5375a2e1272d032de531662466322601b6c3b56 100644 --- a/single/transmission.go +++ b/single/transmission.go @@ -289,5 +289,8 @@ func makeIDs(msg *transmitMessagePayload, publicKey *cyclic.Int, jww.DEBUG.Printf("ephemeral.GetId(%s, %d, %d) = %d", rid, addressSize, timeNow.UnixNano(), ephID.Int64()) } + jww.INFO.Printf("generated by singe use sender reception id for single use: %s, " + + "ephId: %d, pubkey: %x, msg: %s", rid, ephID.Int64(), publicKey.Bytes(), msg) + return rid, ephID, nil } diff --git a/single/transmitMessage.go b/single/transmitMessage.go index 768c47e2697dfe38c731ae0fbd2ffb7759442755..da7f88d9458363ed5e5bc4ea4a89e84a4874af12 100644 --- a/single/transmitMessage.go +++ b/single/transmitMessage.go @@ -9,6 +9,7 @@ package single import ( "encoding/binary" + "fmt" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/crypto/cyclic" @@ -246,3 +247,12 @@ func (mp transmitMessagePayload) SetContents(contents []byte) { copy(mp.contents, contents) } + + +// String returns the contents for printing adhering to the stringer interface. +func (mp transmitMessagePayload) String()string { + return fmt.Sprintf("Data: %x [tagFP: %x, nonce: %x, " + + "maxParts: %x, size: %x, content: %x]", mp.data, mp.tagFP, + mp.nonce, mp.maxParts, mp.size, mp.contents) + +}