mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-18 16:51:50 +01:00
routing/test: set outgoing timelock on non-legacy test cases
Provide valid hop payloads for tests cases that use TLV onion format.
This commit is contained in:
@@ -3471,10 +3471,11 @@ func TestSendToRouteSkipTempErrSuccess(t *testing.T) {
|
|||||||
// Create a simple 1-hop route.
|
// Create a simple 1-hop route.
|
||||||
hops := []*route.Hop{
|
hops := []*route.Hop{
|
||||||
{
|
{
|
||||||
ChannelID: 1,
|
ChannelID: 1,
|
||||||
PubKeyBytes: node.PubKeyBytes,
|
PubKeyBytes: node.PubKeyBytes,
|
||||||
AmtToForward: payAmt,
|
AmtToForward: payAmt,
|
||||||
MPP: record.NewMPP(payAmt, [32]byte{}),
|
OutgoingTimeLock: 120,
|
||||||
|
MPP: record.NewMPP(payAmt, [32]byte{}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
||||||
@@ -3607,10 +3608,11 @@ func TestSendToRouteSkipTempErrTempFailure(t *testing.T) {
|
|||||||
// Create a simple 1-hop route.
|
// Create a simple 1-hop route.
|
||||||
hops := []*route.Hop{
|
hops := []*route.Hop{
|
||||||
{
|
{
|
||||||
ChannelID: 1,
|
ChannelID: 1,
|
||||||
PubKeyBytes: node.PubKeyBytes,
|
PubKeyBytes: node.PubKeyBytes,
|
||||||
AmtToForward: payAmt,
|
AmtToForward: payAmt,
|
||||||
MPP: record.NewMPP(payAmt, [32]byte{}),
|
OutgoingTimeLock: 120,
|
||||||
|
MPP: record.NewMPP(payAmt, [32]byte{}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
||||||
@@ -3688,10 +3690,11 @@ func TestSendToRouteSkipTempErrPermanentFailure(t *testing.T) {
|
|||||||
// Create a simple 1-hop route.
|
// Create a simple 1-hop route.
|
||||||
hops := []*route.Hop{
|
hops := []*route.Hop{
|
||||||
{
|
{
|
||||||
ChannelID: 1,
|
ChannelID: 1,
|
||||||
PubKeyBytes: node.PubKeyBytes,
|
PubKeyBytes: node.PubKeyBytes,
|
||||||
AmtToForward: payAmt,
|
AmtToForward: payAmt,
|
||||||
MPP: record.NewMPP(payAmt, [32]byte{}),
|
OutgoingTimeLock: 120,
|
||||||
|
MPP: record.NewMPP(payAmt, [32]byte{}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
||||||
@@ -3773,10 +3776,11 @@ func TestSendToRouteTempFailure(t *testing.T) {
|
|||||||
// Create a simple 1-hop route.
|
// Create a simple 1-hop route.
|
||||||
hops := []*route.Hop{
|
hops := []*route.Hop{
|
||||||
{
|
{
|
||||||
ChannelID: 1,
|
ChannelID: 1,
|
||||||
PubKeyBytes: node.PubKeyBytes,
|
PubKeyBytes: node.PubKeyBytes,
|
||||||
AmtToForward: payAmt,
|
AmtToForward: payAmt,
|
||||||
MPP: record.NewMPP(payAmt, [32]byte{}),
|
OutgoingTimeLock: 120,
|
||||||
|
MPP: record.NewMPP(payAmt, [32]byte{}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
rt, err := route.NewRouteFromHops(payAmt, 100, node.PubKeyBytes, hops)
|
||||||
|
|||||||
Reference in New Issue
Block a user