From df30b22dd90b1d1cf51884042f774a4b00e07095 Mon Sep 17 00:00:00 2001 From: jbhusson <jonah@elixxir.io> Date: Thu, 6 Jan 2022 10:21:59 -0500 Subject: [PATCH] Add prepend to handleMessage --- network/message/handler.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/network/message/handler.go b/network/message/handler.go index b7574f4cf..5a83f1f36 100644 --- a/network/message/handler.go +++ b/network/message/handler.go @@ -54,7 +54,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge var relationshipFingerprint []byte //if it exists, check against all in the list - has, forMe, _ := m.Session.GetEdge().Check(identity.Source, ecrMsg.GetIdentityFP(), ecrMsg.GetContents()) + has, forMe, _ := m.Session.GetEdge().Check(identity.Source, ecrMsg.GetIdentityFP(), append([]byte{0}, ecrMsg.GetContents()...)) if !has { jww.INFO.Printf("checking backup %v", preimage.MakeDefault(identity.Source)) //if it doesnt exist, check against the default fingerprint for the identity @@ -126,14 +126,12 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge return } - - // Process the decrypted/unencrypted message partition, to see if // we get a full message xxMsg, ok := m.partitioner.HandlePartition(sender, encTy, msg.GetContents(), relationshipFingerprint) - im := fmt.Sprintf("Received message of ecr type %s and msg type " + + im := fmt.Sprintf("Received message of ecr type %s and msg type "+ "%d from %s in round %d,msgDigest: %s, keyFP: %v", encTy, xxMsg.MessageType, sender, bundle.Round, msgDigest, msg.GetKeyFP()) jww.INFO.Print(im) -- GitLab