Review and fix typos in SigCache code.
This commit is contained in:
parent
34a94b7d0b
commit
14ccab80e7
2 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ type SigCache struct {
|
||||||
|
|
||||||
// NewSigCache creates and initializes a new instance of SigCache. Its sole
|
// NewSigCache creates and initializes a new instance of SigCache. Its sole
|
||||||
// parameter 'maxEntries' represents the maximum number of entries allowed to
|
// parameter 'maxEntries' represents the maximum number of entries allowed to
|
||||||
// exist in the SigCache and any particular moment. Random entries are evicted
|
// exist in the SigCache at any particular moment. Random entries are evicted
|
||||||
// to make room for new entries that would cause the number of entries in the
|
// to make room for new entries that would cause the number of entries in the
|
||||||
// cache to exceed the max.
|
// cache to exceed the max.
|
||||||
func NewSigCache(maxEntries uint) *SigCache {
|
func NewSigCache(maxEntries uint) *SigCache {
|
||||||
|
@ -63,7 +63,7 @@ func (s *SigCache) Exists(sigHash wire.ShaHash, sig *btcec.Signature, pubKey *bt
|
||||||
|
|
||||||
// Add adds an entry for a signature over 'sigHash' under public key 'pubKey'
|
// Add adds an entry for a signature over 'sigHash' under public key 'pubKey'
|
||||||
// to the signature cache. In the event that the SigCache is 'full', an
|
// to the signature cache. In the event that the SigCache is 'full', an
|
||||||
// existing entry it randomly chosen to be evicted in order to make space for
|
// existing entry is randomly chosen to be evicted in order to make space for
|
||||||
// the new entry.
|
// the new entry.
|
||||||
//
|
//
|
||||||
// NOTE: This function is safe for concurrent access. Writers will block
|
// NOTE: This function is safe for concurrent access. Writers will block
|
||||||
|
|
|
@ -88,7 +88,7 @@ func TestSigCacheAddEvictEntry(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a new entry, this should cause eviction of a randomly chosen
|
// Add a new entry, this should cause eviction of a randomly chosen
|
||||||
// previously entry.
|
// previous entry.
|
||||||
msgNew, sigNew, keyNew, err := genRandomSig()
|
msgNew, sigNew, keyNew, err := genRandomSig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("unable to generate random signature test data")
|
t.Fatalf("unable to generate random signature test data")
|
||||||
|
|
Loading…
Add table
Reference in a new issue