@@ -98,8 +98,8 @@ func New(
9898 clk clock.Clock ,
9999 localPeerID core.PeerID ,
100100 netevents networkevent.Producer ,
101- logger * zap.SugaredLogger ) * State {
102-
101+ logger * zap.SugaredLogger ,
102+ ) * State {
103103 config = config .applyDefaults ()
104104
105105 return & State {
@@ -154,8 +154,7 @@ func (s *State) Blacklist(peerID core.PeerID, h core.InfoHash) error {
154154 }
155155 s .blacklist [k ] = & blacklistEntry {s .clk .Now ().Add (s .config .BlacklistDuration )}
156156
157- s .log ("peer" , peerID , "hash" , h ).Infof (
158- "Connection blacklisted for %s" , s .config .BlacklistDuration )
157+ s .log ("peer" , peerID , "hash" , h ).Warnf ("Connection blacklisted for %s" , s .config .BlacklistDuration )
159158 s .netevents .Produce (
160159 networkevent .BlacklistConnEvent (h , s .localPeerID , peerID , s .config .BlacklistDuration ))
161160
@@ -189,8 +188,7 @@ func (s *State) AddPending(peerID core.PeerID, h core.InfoHash, neighbors []core
189188 return ErrTooManyMutualConns
190189 }
191190 s .put (h , peerID , entry {status : _pending })
192- s .log ("hash" , h , "peer" , peerID ).Infof (
193- "Added pending conn, capacity now at %d" , s .capacity (h ))
191+ s .log ("hash" , h , "peer" , peerID ).Debugf ("Added pending conn, capacity now at %d" , s .capacity (h ))
194192 return nil
195193 case _pending :
196194 return ErrConnAlreadyPending
@@ -207,7 +205,7 @@ func (s *State) DeletePending(peerID core.PeerID, h core.InfoHash) {
207205 return
208206 }
209207 s .delete (h , peerID )
210- s .log ("hash" , h , "peer" , peerID ).Infof (
208+ s .log ("hash" , h , "peer" , peerID ).Debugf (
211209 "Deleted pending conn, capacity now at %d" , s .capacity (h ))
212210}
213211
@@ -221,7 +219,7 @@ func (s *State) MovePendingToActive(c *conn.Conn) error {
221219 }
222220 s .put (c .InfoHash (), c .PeerID (), entry {status : _active , conn : c })
223221
224- s .log ("hash" , c .InfoHash (), "peer" , c .PeerID ()).Info ("Moved conn from pending to active" )
222+ s .log ("hash" , c .InfoHash (), "peer" , c .PeerID ()).Debug ("Moved conn from pending to active" )
225223 s .netevents .Produce (networkevent .AddActiveConnEvent (c .InfoHash (), s .localPeerID , c .PeerID ()))
226224
227225 return nil
@@ -240,8 +238,7 @@ func (s *State) DeleteActive(c *conn.Conn) {
240238 }
241239 s .delete (c .InfoHash (), c .PeerID ())
242240
243- s .log ("hash" , c .InfoHash (), "peer" , c .PeerID ()).Infof (
244- "Deleted active conn, capacity now at %d" , s .capacity (c .InfoHash ()))
241+ s .log ("hash" , c .InfoHash (), "peer" , c .PeerID ()).Debugf ("Deleted active conn, capacity now at %d" , s .capacity (c .InfoHash ()))
245242 s .netevents .Produce (networkevent .DropActiveConnEvent (
246243 c .InfoHash (), s .localPeerID , c .PeerID ()))
247244}
0 commit comments