diff --git a/exchange/bitswap/bitswap.go b/exchange/bitswap/bitswap.go index 57359c0ecf2c5a4ecf94253ec3579cc2823e0cab..db7bc033f5a7f9ae242e5a20c5d5c95218477d23 100644 --- a/exchange/bitswap/bitswap.go +++ b/exchange/bitswap/bitswap.go @@ -288,7 +288,7 @@ func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg bs.dupBlocksRecvd++ } bs.counterLk.Unlock() - log.Debugf("got block %s from %s (%d,%d)", block, p, bs.blocksRecvd, bs.dupBlocksRecvd) + log.Infof("got block %s from %s (%d,%d)", block, p, bs.blocksRecvd, bs.dupBlocksRecvd) hasBlockCtx, cancel := context.WithTimeout(ctx, hasBlockTimeout) if err := bs.HasBlock(hasBlockCtx, block); err != nil { diff --git a/exchange/bitswap/wantmanager.go b/exchange/bitswap/wantmanager.go index eb49201a6ddf23f20645791f0801c7f266c8aec7..74372f7f066b47eb62f8c66526d9619c83be71ee 100644 --- a/exchange/bitswap/wantmanager.go +++ b/exchange/bitswap/wantmanager.go @@ -66,6 +66,7 @@ type msgQueue struct { } func (pm *WantManager) WantBlocks(ks []u.Key) { + log.Infof("want blocks: %s", ks) pm.addEntries(ks, false) } @@ -97,6 +98,7 @@ func (pm *WantManager) SendBlock(ctx context.Context, env *engine.Envelope) { msg := bsmsg.New(false) msg.AddBlock(env.Block) + log.Infof("Sending block %s to %s", env.Peer, env.Block) err := pm.network.SendMessage(ctx, env.Peer, msg) if err != nil { log.Error(err) @@ -143,8 +145,9 @@ func (pm *WantManager) runQueue(mq *msgQueue) { err := pm.network.ConnectTo(pm.ctx, mq.p) if err != nil { - log.Error(err) + log.Errorf("cant connect to peer %s: %s", mq.p, err) // TODO: cant connect, what now? + continue } // grab outgoing message