htlcswitch+hop: move ForwardingInfo to hop.ForwaringInfo
This commit is contained in:
7 files changed
+66
-54
No files matched your search
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
sphinx "github.com/lightningnetwork/lightning-onion"
|
||||
"github.com/lightningnetwork/lnd/htlcswitch/hop"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/record"
|
||||
"github.com/lightningnetwork/lnd/tlv"
|
||||
@@ -29,7 +30,7 @@ func TestSphinxHopIteratorForwardingInstructions(t *testing.T) {
|
||||
// Next, we'll make the hop forwarding information that we should
|
||||
// extract each type, no matter the payload type.
|
||||
nextAddrInt := binary.BigEndian.Uint64(hopData.NextAddress[:])
|
||||
expectedFwdInfo := ForwardingInfo{
|
||||
expectedFwdInfo := hop.ForwardingInfo{
|
||||
NextHop: lnwire.NewShortChanIDFromInt(nextAddrInt),
|
||||
AmountToForward: lnwire.MilliSatoshi(hopData.ForwardAmount),
|
||||
OutgoingCTLV: hopData.OutgoingCltv,
|
||||
@@ -53,7 +54,7 @@ func TestSphinxHopIteratorForwardingInstructions(t *testing.T) {
|
||||
|
||||
var testCases = []struct {
|
||||
sphinxPacket *sphinx.ProcessedPacket
|
||||
expectedFwdInfo ForwardingInfo
|
||||
expectedFwdInfo hop.ForwardingInfo
|
||||
}{
|
||||
// A regular legacy payload that signals more hops.
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user