2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-09 19:10:47 +00:00
Commit Graph

24 Commits

Author SHA1 Message Date
Boris Nagaev
ed3db3bab2
client: fill LastHop in FetchSwaps
Loop used to "forget" last_hop of swaps created before its restart.
The commit fixes this.

Added test TestFetchSwapsLastHop for this. Filled field abandonChans in test
utility function newSwapClient because the field is used in new test.

Fixes https://github.com/lightninglabs/loop/issues/798
2024-08-08 10:00:36 -03:00
Boris Nagaev
0c2ba74dba
sweepbatcher: factor out loopdb-less version
Changed argument of function NewBatcher from LoopOutFetcher to SweepFetcher
(returning new public type SweepInfo).
This change is backwards-incompatible on the package layer, but nobody seems
to use the package outside of Loop.

To use NewBatcher inside Loop, turn loopdb into SweepFetcher using
function NewSweepFetcherFromSwapStore.
2024-06-03 18:34:35 -03:00
Boris Nagaev
4be69e186e
Revert "sweepbatcher/StoreMock: load LoopOut from loopdb"
This reverts commit d38b7c55a7.

Batcher does not use this data anymore, since previous commit.
2024-05-31 12:28:02 -03:00
Boris Nagaev
d38b7c55a7
sweepbatcher/StoreMock: load LoopOut from loopdb
Method sweepbatcher.Store.FetchBatchSweeps (implementation using real DB) runs
JOIN query to load LoopOut from swaps table. Now the mock does the same.

It is needed to test store and load scenarios in tests.
2024-05-30 10:24:38 -03:00
George Tsagkarelis
33fdde949f
loop: fix loopout and client tests for sweeper integration 2024-01-23 20:38:11 +02:00
George Tsagkarelis
26e239c2c7
loop+test: enhance epoch subscription for multiple subscribers 2024-01-23 20:38:08 +02:00
George Tsagkarelis
e0d85958f7
multi: move StoreMock to loopdb 2024-01-23 20:38:06 +02:00
Slyghtning
ce6f82626b
unit: abandon swap 2023-11-27 11:25:08 +01:00
Andras Banki-Horvath
4d34eb97ce
build: fixup new linter issues 2023-03-29 15:56:40 +02:00
sputn1ck
4baf88c414
multi: fix linter issues
This commit fixes outstanding linter issues, that we're not found by
running `make lint` locally. The linter issues were found by running
`docker run -v $(pwd):/build loop-tools golangci-lint run --whole-files`

I added the `revive` to the excludes as it would be to much of a
refactor and IMO seems unneccesary. E.g.
`interface.go:222:6: exported: type name will be used as
loop.LoopInTerms by other packages, and that stutters; consider
 calling this InTerms (revive)`. I think `loop.LoopInTerms` is fine.
2022-12-15 18:08:38 +01:00
Andras Banki-Horvath
049b17ff96
misc: refactor loop tests to use require where possible 2022-11-30 18:16:45 +01:00
Andras Banki-Horvath
5d7b0abdf5
loopout: add unit test for the MuSig2 sweep case 2022-06-30 16:59:59 +02:00
Harsha Goli
7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2022-03-25 11:00:16 +01:00
carla
16111352a8
multi: add cancel swap function to execute config 2021-05-24 08:40:14 +02:00
Joost Jager
c8666caf20
loopin: mpp pre-swap probe 2020-09-17 13:24:54 +02:00
Joost Jager
0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 2020-06-18 14:27:52 +02:00
carla
65c847674d
multi: add preimage push to loop out after sweep attempt
Once we have revealed our preimage to the world with a sweep attempt,
we can safely push our preimage to the server to speed up on chain
claim.

Rather than rely on the server, we use the state of our invoice in lnd
to determine whether we should continue trying to push the preimage to
the server.
2020-06-08 12:54:08 +02:00
Oliver Gugger
b574e344ea
multi: add persistent logger 2019-10-28 17:09:23 +01:00
Oliver Gugger
69f2af9fdc
loop+cmd: extract types into swap module 2019-10-09 16:14:06 +02:00
Oliver Gugger
36838cf7f4
multi: fix most obvious linter errors 2019-10-09 14:35:41 +02:00
Joost Jager
1b306ad425
loopdb: replace swap state enum by state data object
This commits lays down the foundation in the database for adding more
persistent state data to swaps.
2019-05-20 13:57:09 +02:00
Joost Jager
3e960b8b54
multi: loop in swap 2019-03-28 11:56:49 +01:00
Olaoluwa Osuntokun
94f347e673
multi: finalize rename from uncharge to loop out 2019-03-06 20:34:04 -08:00
Olaoluwa Osuntokun
908d82acdb
loop: extract code from client package into new loop primary package 2019-03-06 20:34:01 -08:00