Commit graph

91 commits

Author SHA1 Message Date
Boris Nagaev
d324b4bfd8
loop: omit payment hops in cost migration
The cost cleanup migration pages through LND payments only to build
a payment-hash to fee map. It does not inspect HTLC attempts,
routes, or per-hop data; pagination still uses the top-level index
offsets returned by ListPayments.

Setting OmitHops is safe for this migration because LND only strips
hop-level route data from HTLC attempts, while preserving the top-level
payment fields the migration reads: hash, fee, and response offsets.
This reduces response size and query cost for nodes with many or large
MPP payments without changing the calculated swap costs.

The migration test records the mocked ListPayments requests and asserts
that OmitHops is set.
2026-06-22 12:46:12 -05:00
Boris Nagaev
2d446b3b9e
test: remove unused PayInvoice mock path
Loop no longer pays invoices through LightningClient.PayInvoice.
Production payment paths use the router client wrappers. lndclient now
also implements PayInvoice on top of router payment APIs, so the old
SendPaymentChannel mock path is no longer exercised.

Remove the dead PayInvoice mock, its SendPaymentChannel plumbing, and
the loop-in resume assertion that watched that channel.
2026-06-11 18:08:02 -05:00
Boris Nagaev
e1f1077f44
loop+test: add loop-in route hint regression 2026-04-17 21:38:36 -05:00
Boris Nagaev
bfbc180e4b
test: add route hint assertion helper 2026-04-17 21:38:36 -05:00
Boris Nagaev
118c73a0bd
go.mod: pin fixed lndclient addinvoice hints
Include https://github.com/lightninglabs/lndclient/pull/268
Preserve AddInvoiceData fields across invoice wrappers
2026-04-17 21:37:47 -05:00
Slyghtning
a10c741a26
lint: fix linter issues 2026-03-09 14:39:45 +01:00
Slyghtning
a862f8ba60
test: unit test ListUnspentDeposits 2025-08-22 16:18:15 +02:00
Slyghtning
e98f733ef8
linter: fix lint issues after linter v2 update 2025-08-19 21:57:00 +02:00
Slyghtning
cc26813f24
test: fix nil dereference
fixes tests TestLoopOutFailOffchain,
TestLoopOutPaymentParameters
2025-08-19 21:57:00 +02:00
Boris Nagaev
36c5d6cee7
test: golang.org/x/net/context -> context 2025-07-24 02:19:25 -03:00
Andras Banki-Horvath
31f996cb37
build: bump tapd to v0.6.1 and lnd to v0.19.2-beta 2025-07-16 19:05:32 +02:00
Boris Nagaev
d2c168945b
test/chainnotifier: send to specific spend reg
This is needed to have multiple spending registrations running and to send
a notification to a specific spending registration.
2025-06-25 22:53:18 -03:00
Boris Nagaev
2f05934dbb
test/chainnotifier_mock: support errors
Support sending errors to error channels returned by RegisterSpendNtfn and
RegisterConfirmationsNtfn.
2025-06-11 10:34:22 -03:00
Boris Nagaev
7636ffdc64
test: fix error messages 2025-06-11 10:34:22 -03:00
Boris Nagaev
09d28b50dd
test: allow intercepting PublishTransaction 2025-05-08 17:24:10 -03:00
Boris Nagaev
cd599b0cea
test: implement SignPsbt RPC 2025-05-08 17:24:10 -03:00
Boris Nagaev
45aa156977
test: implement MinRelayFee RPC 2025-05-08 17:24:10 -03:00
Oliver Gugger
c70dcc5449
mod+liquidity+test: update to latest lndclient+tapd
Required to build litd with the latest lnd+tapd.
2025-04-25 08:38:03 +02:00
Oliver Gugger
722ad8839d
multi: update lnd compile-time dependency to v0.19.0 2025-03-10 22:59:49 +01:00
Slyghtning
b7b553cf1e
unit: manager tests 2024-12-12 18:31:04 +01:00
Oliver Gugger
93525d3edf
multi: bump lnd compile time dependency to v0.18.4-beta 2024-10-22 09:12:31 +02:00
Andras Banki-Horvath
a55c461a8f
test: support incomplete mocks
Updating the mocks to be complete implementation of the underlying
interfaces is not always possible due to cross dependency issues.
This commit embeds the interfaces into the mocks so we can at least
always compile them.
2024-09-02 18:49:22 +02:00
Boris Nagaev
58d9445bc5
test/signer_mock: return signatures of real size
Size of a signature affects the weight of transaction, which is verified
in tests.

Also method SignOutputRaw now returns the number of signatures matching
the number of signature descriptors to prevent crashes in tests where
multiple inputs are signed.
2024-08-21 14:05:50 -03:00
Boris Nagaev
d7fa4ab94d
test.Guard: make timeout configurable 2024-08-13 09:20:31 -03:00
Andras Banki-Horvath
3754730525
loop: paginate fetching payments when running the cost migration 2024-06-05 08:54:24 +02:00
Andras Banki-Horvath
12f7956fd8
build: bump lnd dependency to v0.17.4-beta 2024-02-09 18:20:18 +01:00
George Tsagkarelis
26e239c2c7
loop+test: enhance epoch subscription for multiple subscribers 2024-01-23 20:38:08 +02:00
shuoer86
8421ae6ca4
fix typo test/chainnotifier_mock.go 2024-01-12 20:56:44 +08:00
Oliver Gugger
08026dab93
multi: update linter, fix issues 2023-10-03 19:36:40 +02:00
Oliver Gugger
bac1416636
multi: bump lnd version to v0.17.0-beta 2023-10-03 19:36:32 +02:00
Andras Banki-Horvath
4d34eb97ce
build: fixup new linter issues 2023-03-29 15:56:40 +02:00
Andras Banki-Horvath
a7451622e5
mod: bump LND and lndclient to include musig2 1.0rc2 changes
This commit bumps LND and lndclient to make it possible to upgrade
taproot HTLC construction with a MuSig2 version. This is required to
support both old (MuSig2 0.4) and new (MuSig2 1.0) clients.
2023-02-06 20:46:03 +01: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
977b72019d
loopd: bump minimum lnd version to v0.15.1-beta
In this commit we bump the minimum LND version required to run loopd to
v0.15.1-beta in order to ensure that the underlying chain backend
supports taproot (https://github.com/lightningnetwork/lnd/pull/6798)
2022-10-07 12:24:25 +02:00
sputn1ck
0f924b36cd
multi: bump lndclient and lnd version to latest
Co-authored-by: Oliver Gugger <gugger@gmail.com>
2022-07-07 17:28:22 +02:00
Andras Banki-Horvath
5d7b0abdf5
loopout: add unit test for the MuSig2 sweep case 2022-06-30 16:59:59 +02:00
Andras Banki-Horvath
5c04b8db05
test: add richer implementation to MuSig2CreateSession 2022-06-30 16:59:57 +02:00
Oliver Gugger
d5952f1202
multi: bump all dependency to use lnd 0.15.0-beta.rc4
This commit bumps all dependencies to be in line with what's required
for the current release candidate of lnd 0.15.0-beta.
2022-06-03 10:50:47 +02:00
sputn1ck
a1271fee40
multi: fix linter issues 2022-05-20 10:16:46 +02:00
Harsha Goli
7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2022-03-25 11:00:16 +01:00
Andras Banki-Horvath
dc9bc9e976
routing: integrate forced MC import to the low/high plugin 2022-03-16 13:23:41 +01:00
Andras Banki-Horvath
01bf94ad11
tests: add unit tests for the low/high routing plugin 2022-02-14 10:14:47 +01:00
Harsha Goli
9db43a4dbd
loop: Reimplement SelectHopHints from lnd
In this commit, instead of importing SelectHopHints from lnd, we chose
to reimplement the functionality here, for the purpose of adding hop
hints in case the user informs us the client node is considered private.

In the future, we should modify the origin SelectHopHints to take
closures for all it's data sources, so we can use it's logic external
2021-12-07 14:23:41 -05:00
Oliver Gugger
2c6e035235
multi: bump lnd compile time dependency to v0.14.0-beta.rc1 2021-11-03 19:31:21 +01:00
carla
cca5926263
multi: bump lndclient to v0.12.0-13
To allow code with more up-to-date dependencies to import loop, we
bump our lndclient version. The minimum loop version remains 11.1
since we're not using any new apis.
2021-10-24 10:22:30 +02:00
carla
ab9a662758
loop/test: simplify preimage push test to be less dependent on height
Our preimage push test previously relied on our dropping down to the
default sweep conf target to mock a drop in chain fees. This makes
our test dependent on height, which makes changes to our sweep logic
regarding when we reveal our preimage break this test. In this commit
that logic is replaced with simply locking our mock and updating fees
on the fly.
2021-05-12 14:00:44 +02:00
carla
4911130671
loopin: store loop in on-chain fees 2021-03-03 12:49:59 +02:00
carla
6c2d88b3a5
multi: bump lndclient to version with wait for unlock 2021-01-14 09:13:01 +02:00
Oliver Gugger
38ddbfb45d
mod+loopin+loopout: update lndclient, add labels to TXs
We update to the latest lndclient that now requires a label when
publishing an on-chain transaction. Instead of just adding an empty
string, we use the proper labels added in a previous commit.
2020-10-15 10:40:12 +02:00