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

removed bad rejection of new IDs

parent 1a129d39
No related branches found
No related tags found
No related merge requests found
...@@ -86,17 +86,12 @@ func track(session *storage.Session, ourId *id.ID, stop *stoppable.Single) { ...@@ -86,17 +86,12 @@ func track(session *storage.Session, ourId *id.ID, stop *stoppable.Single) {
// Add identities to storage if unique // Add identities to storage if unique
for _, identity := range identities { for _, identity := range identities {
// Track if identity has been generated already
if identity.StartValid.After(lastCheck) {
// If not not, insert identity into store
if err = receptionStore.AddIdentity(identity); err != nil { if err = receptionStore.AddIdentity(identity); err != nil {
jww.FATAL.Panicf("Could not insert "+ jww.FATAL.Panicf("Could not insert "+
"identity: %v", err) "identity: %v", err)
} }
} }
}
// Generate the time stamp for storage // Generate the time stamp for storage
vo, err := marshalTimestamp(now) vo, err := marshalTimestamp(now)
if err != nil { if err != nil {
...@@ -192,11 +187,7 @@ func calculateTickerTime(baseIDs []ephemeral.ProtoIdentity) time.Duration { ...@@ -192,11 +187,7 @@ func calculateTickerTime(baseIDs []ephemeral.ProtoIdentity) time.Duration {
return time.Duration(0) return time.Duration(0)
} }
// Get the last identity in the list // Get the last identity in the list
index := 0 lastIdentity := baseIDs[len(baseIDs)-1]
if len(baseIDs)-1 > 0 {
index = len(baseIDs) - 1
}
lastIdentity := baseIDs[index]
// Factor out the grace period previously expanded upon. // Factor out the grace period previously expanded upon.
// Calculate and return that duration // Calculate and return that duration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment