From f98e66cc4d89647c7f221f012939fe4cb31ebfb9 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 7 Nov 2024 01:42:11 +0100 Subject: [PATCH] fix(bitswap): log unexpected blocks to debug level (#711) --- CHANGELOG.md | 6 ++---- .../internal/providerquerymanager/providerquerymanager.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e67d0be7..278fa2932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,14 +18,12 @@ The following emojis are used to highlight certain changes: ### Changed -- updated to go-libp2p to [v0.37.0](https://github.com/libp2p/go-libp2p/releases/tag/v0.37.0) - ### Removed ### Fixed -- Fix panic if current live count is greater than broadcast limit [#702](https://github.com/ipfs/boxo/pull/702) - +- `bitswap/client` no longer logs `"Received provider X for cid Y not requested` to ERROR level, moved to DEBUG [#771](https://github.com/ipfs/boxo/pull/711) + ### Security ## [v0.24.2] diff --git a/bitswap/client/internal/providerquerymanager/providerquerymanager.go b/bitswap/client/internal/providerquerymanager/providerquerymanager.go index ea10a40e5..ab4273a82 100644 --- a/bitswap/client/internal/providerquerymanager/providerquerymanager.go +++ b/bitswap/client/internal/providerquerymanager/providerquerymanager.go @@ -355,7 +355,7 @@ func (rpm *receivedProviderMessage) debugMessage() { func (rpm *receivedProviderMessage) handle(pqm *ProviderQueryManager) { requestStatus, ok := pqm.inProgressRequestStatuses[rpm.k] if !ok { - log.Errorf("Received provider (%s) for cid (%s) not requested", rpm.p.String(), rpm.k.String()) + log.Debugf("Received provider (%s) for cid (%s) not requested", rpm.p.String(), rpm.k.String()) return } requestStatus.providersSoFar = append(requestStatus.providersSoFar, rpm.p)