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

Clean up code

parent 0bb71608
Branches
Tags
1 merge request!23Release
...@@ -563,8 +563,6 @@ func (c *Client) DeleteContact(partnerId *id.ID) error { ...@@ -563,8 +563,6 @@ func (c *Client) DeleteContact(partnerId *id.ID) error {
return err return err
} }
c.storage.Conversations().Delete(partnerId) c.storage.Conversations().Delete(partnerId)
// todo: find a way to clean partition up?
//c.storage.Partition().Clean()
return nil return nil
} }
......
...@@ -118,7 +118,7 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St ...@@ -118,7 +118,7 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St
PrivKey: nil, PrivKey: nil,
Request: r, Request: r,
} }
jww.INFO.Printf("Loaded send request for %s", sr.partner) jww.DEBUG.Printf("Loaded send request for %s", sr.partner)
rid = sr.partner rid = sr.partner
r.sent = sr r.sent = sr
...@@ -135,7 +135,6 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St ...@@ -135,7 +135,6 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St
default: default:
jww.FATAL.Panicf("Unknown request type: %d", r.rt) jww.FATAL.Panicf("Unknown request type: %d", r.rt)
} }
jww.INFO.Printf("LoadStore partner: %s", partner)
//store in the request map //store in the request map
s.requests[*rid] = r s.requests[*rid] = r
...@@ -146,7 +145,6 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St ...@@ -146,7 +145,6 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St
func (s *Store) save() error { func (s *Store) save() error {
requestIDList := make([]requestDisk, len(s.requests)) requestIDList := make([]requestDisk, len(s.requests))
jww.INFO.Printf("Saving Auth Store")
index := 0 index := 0
for pid, r := range s.requests { for pid, r := range s.requests {
rDisk := requestDisk{ rDisk := requestDisk{
......
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
type multiPartID [16]byte type multiPartID [16]byte
const packagePrefix = "Partition" const packagePrefix = "Partition"
const clearPartitionInterval = 12*time.Hour const clearPartitionInterval = 5*time.Hour
const clearPartitionThreshold = 24*time.Hour const clearPartitionThreshold = 24*time.Hour
type Store struct { type Store struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment