Commit 70f2b6b0 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

remove debugerrors

We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.

It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
parent d1ca2ab0
......@@ -3,6 +3,7 @@
package bitswap
import (
"errors"
"math"
"sync"
"time"
......@@ -21,7 +22,6 @@ import (
"github.com/ipfs/go-ipfs/thirdparty/delay"
eventlog "github.com/ipfs/go-ipfs/thirdparty/eventlog"
u "github.com/ipfs/go-ipfs/util"
errors "github.com/ipfs/go-ipfs/util/debugerror"
pset "github.com/ipfs/go-ipfs/util/peerset" // TODO move this to peerstore
)
......@@ -432,7 +432,7 @@ func (bs *Bitswap) ReceiveError(err error) {
func (bs *Bitswap) send(ctx context.Context, p peer.ID, m bsmsg.BitSwapMessage) error {
defer log.EventBegin(ctx, "sendMessage", p, m).Done()
if err := bs.network.SendMessage(ctx, p, m); err != nil {
return errors.Wrap(err)
return err
}
return bs.engine.MessageSent(p, m)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment