p2p/peer/peerstore: mu position + comment
Juan Batiz-Benet committed
Jan 26, 2015 at 22:31 UTC
71f2c4dee04e6f4eea53a48852b0e8f066b0c4ae
1 file changed
+2
-1
p2p/peer/peerstore.go
+2
-1
@@ -62,9 +62,10 @@ func (e *expiringAddr) Expired() bool {
62
type addressMap map[string]expiringAddr
63
64
type addressbook struct {
65
+ sync.RWMutex // guards all fields
66
+
67
addrs map[ID]addressMap
68
ttl time.Duration // initial ttl
67
- sync.RWMutex
69
}
70
71
func newAddressbook() *addressbook {