p2p/peer/peerstore: mu position + comment

This commit is contained in:
Juan Batiz-Benet 2015-01-26 22:31:58 -08:00
parent d8a63be372
commit 71f2c4dee0

View File

@ -62,9 +62,10 @@ func (e *expiringAddr) Expired() bool {
type addressMap map[string]expiringAddr
type addressbook struct {
sync.RWMutex // guards all fields
addrs map[ID]addressMap
ttl time.Duration // initial ttl
sync.RWMutex
}
func newAddressbook() *addressbook {