htlcswitch/link_test: DecodeOnionObfuscator -> ExtractErrorEncrypter
This commit is contained in:
parent
d13a566284
commit
2fbb0c8b92
@ -16,12 +16,12 @@ import (
|
|||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/go-errors/errors"
|
"github.com/go-errors/errors"
|
||||||
"github.com/lightningnetwork/lightning-onion"
|
|
||||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||||
"github.com/lightningnetwork/lnd/channeldb"
|
"github.com/lightningnetwork/lnd/channeldb"
|
||||||
"github.com/lightningnetwork/lnd/contractcourt"
|
"github.com/lightningnetwork/lnd/contractcourt"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet"
|
"github.com/lightningnetwork/lnd/lnwallet"
|
||||||
"github.com/lightningnetwork/lnd/lnwire"
|
"github.com/lightningnetwork/lnd/lnwire"
|
||||||
|
"github.com/roasbeef/btcd/btcec"
|
||||||
"github.com/roasbeef/btcd/chaincfg/chainhash"
|
"github.com/roasbeef/btcd/chaincfg/chainhash"
|
||||||
"github.com/roasbeef/btcd/wire"
|
"github.com/roasbeef/btcd/wire"
|
||||||
"github.com/roasbeef/btcutil"
|
"github.com/roasbeef/btcutil"
|
||||||
@ -1124,8 +1124,8 @@ func TestChannelLinkMultiHopDecodeError(t *testing.T) {
|
|||||||
defer n.stop()
|
defer n.stop()
|
||||||
|
|
||||||
// Replace decode function with another which throws an error.
|
// Replace decode function with another which throws an error.
|
||||||
n.carolChannelLink.cfg.DecodeOnionObfuscator = func(
|
n.carolChannelLink.cfg.ExtractErrorEncrypter = func(
|
||||||
*sphinx.OnionPacket) (ErrorEncrypter, lnwire.FailCode) {
|
*btcec.PublicKey) (ErrorEncrypter, lnwire.FailCode) {
|
||||||
return nil, lnwire.CodeInvalidOnionVersion
|
return nil, lnwire.CodeInvalidOnionVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1472,7 +1472,7 @@ func newSingleLinkTestHarness(chanAmt, chanReserve btcutil.Amount) (
|
|||||||
Circuits: aliceSwitch.CircuitModifier(),
|
Circuits: aliceSwitch.CircuitModifier(),
|
||||||
ForwardPackets: aliceSwitch.ForwardPackets,
|
ForwardPackets: aliceSwitch.ForwardPackets,
|
||||||
DecodeHopIterators: decoder.DecodeHopIterators,
|
DecodeHopIterators: decoder.DecodeHopIterators,
|
||||||
DecodeOnionObfuscator: func(*sphinx.OnionPacket) (
|
ExtractErrorEncrypter: func(*btcec.PublicKey) (
|
||||||
ErrorEncrypter, lnwire.FailCode) {
|
ErrorEncrypter, lnwire.FailCode) {
|
||||||
return obfuscator, lnwire.CodeNone
|
return obfuscator, lnwire.CodeNone
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user