mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
swap: add lasthop, outgoingchanids to swapinfo
This commit is contained in:
parent
e98d813885
commit
efb6f75d60
5 changed files with 50 additions and 3 deletions
|
|
@ -52,9 +52,11 @@ func TestLoopOutPaymentParameters(t *testing.T) {
|
|||
|
||||
const maxParts = 5
|
||||
|
||||
chanSet := loopdb.ChannelSet{2, 3}
|
||||
|
||||
// Initiate the swap.
|
||||
req := *testRequest
|
||||
req.OutgoingChanSet = loopdb.ChannelSet{2, 3}
|
||||
req.OutgoingChanSet = chanSet
|
||||
|
||||
initResult, err := newLoopOutSwap(
|
||||
context.Background(), cfg, height, &req,
|
||||
|
|
@ -90,6 +92,12 @@ func TestLoopOutPaymentParameters(t *testing.T) {
|
|||
t.Fatal("unexpected state")
|
||||
}
|
||||
|
||||
// Check that the SwapInfo contains the outgoing chan set
|
||||
require.Equal(t, chanSet, state.OutgoingChanSet)
|
||||
|
||||
// Check that the SwapInfo does not contain a last hop
|
||||
require.Nil(t, state.LastHop)
|
||||
|
||||
// Intercept the swap and prepay payments. Order is undefined.
|
||||
payments := []test.RouterPaymentChannelMessage{
|
||||
<-ctx.Lnd.RouterSendPaymentChannel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue