Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions liquidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ func performSwap(info ManageChannelLiquidityInfo, channel *lnrpc.Channel, swapAm
swapRequest := provider.SubmarineSwapRequest{
SatsAmount: swapAmount,
LastHopPubkey: channel.RemotePubkey,
ChannelId: channel.GetChanId(),
}

//Log including channel.GetChanId() and swapAmount
Expand Down Expand Up @@ -700,7 +701,7 @@ func performSwap(info ManageChannelLiquidityInfo, channel *lnrpc.Channel, swapAm
swapType := "swap"

//Add fees to counter
recordSwapFees(swapStatus, info, swapType, channel)
recordSwapFees(*swapStatus, info, swapType, channel)
}
return nil
}
Expand Down Expand Up @@ -728,7 +729,7 @@ func performReverseSwap(info ManageChannelLiquidityInfo, channel *lnrpc.Channel,
//Perform the swap
swapRequest := provider.ReverseSubmarineSwapRequest{
SatsAmount: swapAmount,
ChannelSet: []uint64{channel.GetChanId()},
ChannelId: channel.GetChanId(),
ReceiverBTCAddress: address,
}

Expand Down Expand Up @@ -790,7 +791,7 @@ func performReverseSwap(info ManageChannelLiquidityInfo, channel *lnrpc.Channel,
swapType := "rswap"

//Add fees to counter
recordSwapFees(swapStatus, info, swapType, channel)
recordSwapFees(*swapStatus, info, swapType, channel)
}
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions liquidator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func createMockProviderValidSwap(mockCtrl *gomock.Controller) *provider.MockProv
InvoiceBTCAddress: "bcrt1q6zszlnxhlq0lsmfc42nkwgqedy9kvmvmxhkvme",
}, nil).AnyTimes()

mockProvider.EXPECT().MonitorSwap(gomock.Any(), gomock.Any(), gomock.Any()).Return(looprpc.SwapStatus{
mockProvider.EXPECT().MonitorSwap(gomock.Any(), gomock.Any(), gomock.Any()).Return(&looprpc.SwapStatus{
Amt: 0,
Id: "",
IdBytes: []byte{},
Expand Down Expand Up @@ -396,7 +396,7 @@ func createMockProviderInvalidSwap(mockCtrl *gomock.Controller) *provider.MockPr
InvoiceBTCAddress: "bcrt1q6zszlnxhlq0lsmfc42nkwgqedy9kvmvmxhkvme",
}, nil).AnyTimes()

mockProviderInvalid.EXPECT().MonitorSwap(gomock.Any(), gomock.Any(), gomock.Any()).Return(looprpc.SwapStatus{
mockProviderInvalid.EXPECT().MonitorSwap(gomock.Any(), gomock.Any(), gomock.Any()).Return(&looprpc.SwapStatus{
Amt: 0,
Id: "",
IdBytes: []byte{},
Expand Down
331 changes: 2 additions & 329 deletions nodeguard/nodeguard_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading