add documentation. fix formatting

This commit is contained in:
Jared Wasinger 2018-04-09 06:57:37 +00:00
parent 04367fc5ea
commit ac39a0ccb1
2 changed files with 5 additions and 7 deletions

View file

@ -759,7 +759,7 @@ func (self *Pss) forward(msg *PssMsg) {
// SECTION: Caching // SECTION: Caching
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
// remove expired entries from forward cache // cleanFwdCache is used to periodically remove expired entries from the forward cache
func (self *Pss) cleanFwdCache() { func (self *Pss) cleanFwdCache() {
self.fwdCacheMu.Lock() self.fwdCacheMu.Lock()
defer self.fwdCacheMu.Unlock() defer self.fwdCacheMu.Unlock()

View file

@ -144,7 +144,6 @@ func TestCache(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
ps := newTestPss(privkey, nil, nil) ps := newTestPss(privkey, nil, nil)
pp := NewPssParams(privkey) pp := NewPssParams(privkey)
data := []byte("foo") data := []byte("foo")
datatwo := []byte("bar") datatwo := []byte("bar")
@ -192,7 +191,6 @@ func TestCache(t *testing.T) {
t.Fatalf("could not store cache msgthree: %v", err) t.Fatalf("could not store cache msgthree: %v", err)
} }
if digest == digesttwo { if digest == digesttwo {
t.Fatalf("different msgs return same hash: %d", digesttwo) t.Fatalf("different msgs return same hash: %d", digesttwo)
} }