Skip to content

Commit

Permalink
chore: bump deps & cleanup dont add
Browse files Browse the repository at this point in the history
This commit was moved from ipfs/go-bitswap@9bbccf8
  • Loading branch information
Jorropo committed Jul 28, 2022
1 parent 8e28164 commit 4f2f126
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bitswap/internal/decision/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,11 +780,11 @@ func (e *Engine) ReceivedBlocks(from peer.ID, blks []blocks.Block) {

// Record how many bytes were received in the ledger
l.lk.Lock()
defer l.lk.Unlock()
for _, blk := range blks {
log.Debugw("Bitswap engine <- block", "local", e.self, "from", from, "cid", blk.Cid(), "size", len(blk.RawData()))
e.scoreLedger.AddToReceivedBytes(l.Partner, len(blk.RawData()))
}
l.lk.Unlock()
}

// NotifyNewBlocks is called when new blocks becomes available locally, and in particular when the caller of bitswap
Expand Down
2 changes: 1 addition & 1 deletion bitswap/internal/decision/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func newTestEngineWithSampling(ctx context.Context, idStr string, peerSampleInte
e.StartWorkers(ctx, process.WithTeardown(func() error { return nil }))
return engineSet{
Peer: peer.ID(idStr),
// Strategy: New(true),
//Strategy: New(true),
PeerTagger: fpt,
Blockstore: bs,
Engine: e,
Expand Down

0 comments on commit 4f2f126

Please sign in to comment.