mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
Merge pull request #636 from hieblmi/loopin-settlement-fix
auto loopin: consider settled invoices swap succeeded
This commit is contained in:
commit
5739fa59c9
1 changed files with 8 additions and 2 deletions
|
|
@ -1205,8 +1205,14 @@ func (m *Manager) currentSwapTraffic(loopOut []*loopdb.LoopOut,
|
|||
pubkey := *in.Contract.LastHop
|
||||
|
||||
switch {
|
||||
// Include any pending swaps in our ongoing set of swaps.
|
||||
case in.State().State.Type() == loopdb.StateTypePending:
|
||||
// Include any pending swaps in our ongoing set of swaps. Swaps
|
||||
// that reached InvoiceSettled are not considered ongoing since
|
||||
// from the client's perspective the swap is complete. This
|
||||
// consideration allows the client to dispatch the next autoloop
|
||||
// in once an invoice for a previous swap is settled.
|
||||
case in.State().State.Type() == loopdb.StateTypePending &&
|
||||
in.State().State != loopdb.StateInvoiceSettled:
|
||||
|
||||
traffic.ongoingLoopIn[pubkey] = true
|
||||
|
||||
// If a swap failed with an on-chain timeout, the server could
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue