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

Add partition clear thread to client runner

parent 8c7c8c3a
No related branches found
No related tags found
1 merge request!23Release
...@@ -186,6 +186,8 @@ func OpenClient(storageDir string, password []byte, parameters params.Network) ( ...@@ -186,6 +186,8 @@ func OpenClient(storageDir string, password []byte, parameters params.Network) (
parameters: parameters, parameters: parameters,
} }
c.runner.Add(c.storage.Partition().ClearMessages())
return c, nil return c, nil
} }
......
...@@ -12,6 +12,7 @@ import ( ...@@ -12,6 +12,7 @@ import (
"gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/message"
"gitlab.com/elixxir/client/storage" "gitlab.com/elixxir/client/storage"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/netTime"
"time" "time"
) )
...@@ -80,9 +81,9 @@ func (p Partitioner) HandlePartition(sender *id.ID, _ message.EncryptionType, ...@@ -80,9 +81,9 @@ func (p Partitioner) HandlePartition(sender *id.ID, _ message.EncryptionType,
// Handle the message ID // Handle the message ID
messageID := p.session.Conversations().Get(sender). messageID := p.session.Conversations().Get(sender).
ProcessReceivedMessageID(fm.GetID()) ProcessReceivedMessageID(fm.GetID())
storeageTimestamp := netTime.Now()
return p.session.Partition().AddFirst(sender, fm.GetType(), return p.session.Partition().AddFirst(sender, fm.GetType(),
messageID, fm.GetPart(), fm.GetNumParts(), fm.GetTimestamp(), messageID, fm.GetPart(), fm.GetNumParts(), fm.GetTimestamp(), storeageTimestamp,
fm.GetSizedContents(), relationshipFingerprint) fm.GetSizedContents(), relationshipFingerprint)
} else { } else {
// If it is a subsequent message part, handle it as so // If it is a subsequent message part, handle it as so
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment