mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
add documentation. fix formatting
This commit is contained in:
parent
04367fc5ea
commit
ac39a0ccb1
2 changed files with 5 additions and 7 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue