Skip to content

Commit

Permalink
Change error comparation
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkushinDaniil committed Nov 28, 2024
1 parent abb2a8f commit 3725260
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/starknet/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package starknet
import (
"bytes"
"context"
"errors"
"fmt"
"iter"
"sync"
Expand Down Expand Up @@ -411,7 +412,7 @@ 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 {
if err != db.ErrKeyNotFound {
if !errors.Is(err, db.ErrKeyNotFound) {
h.log.Errorw("Failed to generate data", "blockNumber", it.BlockNumber(), "err", err)
}
break
Expand Down Expand Up @@ -450,7 +451,7 @@ 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 {
if err != db.ErrKeyNotFound {
if !errors.Is(err, db.ErrKeyNotFound) {
h.log.Errorw("Failed to generate data", "blockNumber", it.BlockNumber(), "err", err)
}
break
Expand Down

0 comments on commit 3725260

Please sign in to comment.