mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-21 14:04:06 +01:00
htlcswitch/link_test: DecodeOnionObfuscator -> ExtractErrorEncrypter
This commit is contained in:
parent
d13a566284
commit
2fbb0c8b92
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue