diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go index 886164d9..1879161f 100644 --- a/htlcswitch/link_test.go +++ b/htlcswitch/link_test.go @@ -16,12 +16,12 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/go-errors/errors" - "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/contractcourt" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" + "github.com/roasbeef/btcd/btcec" "github.com/roasbeef/btcd/chaincfg/chainhash" "github.com/roasbeef/btcd/wire" "github.com/roasbeef/btcutil" @@ -1124,8 +1124,8 @@ func TestChannelLinkMultiHopDecodeError(t *testing.T) { defer n.stop() // Replace decode function with another which throws an error. - n.carolChannelLink.cfg.DecodeOnionObfuscator = func( - *sphinx.OnionPacket) (ErrorEncrypter, lnwire.FailCode) { + n.carolChannelLink.cfg.ExtractErrorEncrypter = func( + *btcec.PublicKey) (ErrorEncrypter, lnwire.FailCode) { return nil, lnwire.CodeInvalidOnionVersion } @@ -1472,7 +1472,7 @@ func newSingleLinkTestHarness(chanAmt, chanReserve btcutil.Amount) ( Circuits: aliceSwitch.CircuitModifier(), ForwardPackets: aliceSwitch.ForwardPackets, DecodeHopIterators: decoder.DecodeHopIterators, - DecodeOnionObfuscator: func(*sphinx.OnionPacket) ( + ExtractErrorEncrypter: func(*btcec.PublicKey) ( ErrorEncrypter, lnwire.FailCode) { return obfuscator, lnwire.CodeNone },