Skip to content

Commit f54c9ea

Browse files
committed
htlcswitch: replace errors package implementation
1 parent b21521f commit f54c9ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

htlcswitch/link.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
crand "crypto/rand"
66
"crypto/sha256"
7+
"errors"
78
"fmt"
89
prand "math/rand"
910
"sync"
@@ -13,7 +14,6 @@ import (
1314
"github.com/btcsuite/btcd/btcutil"
1415
"github.com/btcsuite/btcd/wire"
1516
"github.com/btcsuite/btclog"
16-
"github.com/go-errors/errors"
1717
"github.com/lightningnetwork/lnd/build"
1818
"github.com/lightningnetwork/lnd/channeldb"
1919
"github.com/lightningnetwork/lnd/channeldb/models"
@@ -480,7 +480,7 @@ var _ ChannelLink = (*channelLink)(nil)
480480
// NOTE: Part of the ChannelLink interface.
481481
func (l *channelLink) Start() error {
482482
if !atomic.CompareAndSwapInt32(&l.started, 0, 1) {
483-
err := errors.Errorf("channel link(%v): already started", l)
483+
err := fmt.Errorf("channel link(%v): already started", l)
484484
l.log.Warn("already started")
485485
return err
486486
}
@@ -4080,7 +4080,7 @@ func (l *channelLink) sendMalformedHTLCError(htlcIndex uint64,
40804080
// remote peer.
40814081
func (l *channelLink) fail(linkErr LinkFailureError,
40824082
format string, a ...interface{}) {
4083-
reason := errors.Errorf(format, a...)
4083+
reason := fmt.Errorf(format, a...)
40844084

40854085
// Return if we have already notified about a failure.
40864086
if l.failed {

0 commit comments

Comments
 (0)