Skip to content

Commit

Permalink
Fix spamming errors when requesting data from Juno that is not (yet) …
Browse files Browse the repository at this point in the history
…present
  • Loading branch information
AnkushinDaniil committed Nov 28, 2024
1 parent e3d6ccf commit 1e3d578
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions p2p/starknet/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/NethermindEth/juno/blockchain"
"github.com/NethermindEth/juno/core"
"github.com/NethermindEth/juno/core/felt"
"github.com/NethermindEth/juno/db"
"github.com/NethermindEth/juno/p2p/starknet/spec"
"github.com/NethermindEth/juno/utils"
"github.com/libp2p/go-libp2p/core/network"
Expand Down Expand Up @@ -410,7 +411,9 @@ func (h *Handler) processIterationRequest(iteration *spec.Iteration, finMsg prot
// pass it to handler function (some might be interested in header, others in entire block)
msg, err := getMsg(it)
if err != nil {
h.log.Errorw("Failed to generate data", "blockNumber", it.BlockNumber(), "err", err)
if err != db.ErrKeyNotFound {
h.log.Errorw("Failed to generate data", "blockNumber", it.BlockNumber(), "err", err)
}
break
}

Expand Down Expand Up @@ -447,7 +450,9 @@ func (h *Handler) processIterationRequestMulti(iteration *spec.Iteration, finMsg
// pass it to handler function (some might be interested in header, others in entire block)
messages, err := getMsg(it)
if err != nil {
h.log.Errorw("Failed to generate data", "blockNumber", it.BlockNumber(), "err", err)
if err != db.ErrKeyNotFound {
h.log.Errorw("Failed to generate data", "blockNumber", it.BlockNumber(), "err", err)
}
break
}

Expand Down

0 comments on commit 1e3d578

Please sign in to comment.