Commit Graph

477 Commits

Author SHA1 Message Date
Abdullahi Yunus
141cc571ab itest: check for config addrs precedence
In this commit, we update the itest to check for precedence of the
config addresses over the persisted addresses.

We did not check for address persistence after restart (without the
extraArgs `--externalip`) because in `lntest/node/config.goL300`,
`GenArg` by default sets the `--externalip` flag, which makes
the config addrs to always take precedence over the persisted
addrs, for the tests.
2025-09-24 10:51:19 +01:00
yyforyongyu
2d59976e16 rpcserver+itest: skip err from FlapCount
We need to make sure the `ListPeers` to be robust against errors from
the `FlapCount` so this RPC won't fail due to no flap count info. Also
updated the itest to check this field.
2025-09-18 22:29:40 +08:00
Yong
5082566ed7 Merge pull request #9677 from NishantBansal2003/conf-count
Expose confirmation count for pending 'channel open' transactions
2025-09-11 22:36:05 +08:00
Nishant Bansal
8f62efb1fa itest: add test for ConfirmationsUntilActive and ConfirmationHeight
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-09-11 18:27:38 +05:30
Elle Mouton
9ce14371e1 multi: switch on graph SQL migration
In this commit, the graph SQL migration is added to the production
build.
2025-09-04 18:52:00 +02:00
Boris Nagaev
dee8ad3754 multi: context.Background() -> t.Context()
Use the new feature of Go 1.24, fix linter warnings.

This change was produced by:
 - running golangci-lint run --fix
 - sed 's/context.Background/t.Context/' -i `git grep -l context.Background | grep test.go`
 - manually fixing broken tests
 - itest, lntest: use ht.Context() where ht or hn is available
 - in HarnessNode.Stop() we keep using context.Background(), because it is
   called from a cleanup handler in which t.Context() is canceled already.
2025-08-30 14:13:44 -03:00
Abdullahi Yunus
2dc9ca43f3 itest: test for node ann persistence
This commit adds an itest that verify the behaviour of correctly
reusing persisted node ann configs across restarts. It also ensures
that the node ann configs are applied using the correct hierarchy.
2025-08-16 16:39:53 +01:00
Elle Mouton
b1deddec44 multi: remove DefaultQueryConfig
And always make use of either the new DefaultSQLiteConfig or
DefaultPostgresConfig.
2025-08-13 14:43:31 +02:00
Oliver Gugger
74b327ba9c Merge pull request #10127 from ellemouton/graphPerf8
[7] graph/db+autopilot: improve efficiency of autopilot methods that use the ForEachNode/ForEachChannel pattern
2025-08-06 07:05:25 -06:00
Elle Mouton
15e17e1270 graph/db: remove NodeRTx ForEachChannel method 2025-08-06 09:52:10 +02:00
ziggie
5c22e5eb25 itest: add payment test with max htlc restriction 2025-08-06 09:37:09 +02:00
Oliver Gugger
cce2df9018 itest: run FundPsbt test with imported account
This demonstrates that the "imported" account behaves differently for a
wallet that's watch-only vs. normal. The testTaprootImportTapscriptFullKeyFundPsbt
test case succeeds in a normal run but fails in a remote-signing setup.

For some reason, an imported tapscript address ends up in the "default"
account when remote-signing but in the "imported" account for a normal
wallet.
2025-08-05 16:41:01 +02:00
Oliver Gugger
c214575de1 itest: run normal FundPsbt test case in remote-signer mode
This makes sure there is no general issue with running the pay-join
FundPsbt test case in a remote signer setup.
2025-08-05 16:41:00 +02:00
Yong
3db93f5b29 Merge pull request #10117 from yyforyongyu/keep-exclusive
contractcourt+sweep: make anchor inputs exclusive
2025-08-05 14:57:26 +08:00
Oliver Gugger
7152224b22 Merge pull request #10118 from ellemouton/graphPerf5
[4] sqldb+graph/db: add and use new pagination helper
2025-08-04 05:04:50 -06:00
yyforyongyu
3da4093012 itest: fix tests re the new anchor behavior 2025-08-04 16:50:31 +08:00
Boris Nagaev
c22768283c walletrpc: allow conf_target=1 in FundPsbt
Modified 'fund_psbt' itest to test this scenario.
2025-08-01 17:16:02 -03:00
Boris Nagaev
cd6e648a7f itest: add test for walletrpc.EstimateFee
Make sure conf_target=1 is accepted, but conf_target=0 is not.
2025-08-01 17:16:00 -03:00
Elle Mouton
a6248872cb sqldb: rename ExecutePagedQuery to ExecuteBatchQuery
We rename this helper along the config types & helper types for it
because the word "page" is used more often in the context of paging
through results using an offset and limit whereas this helper is
specifically used to split up the slice in queries of the form
"WHERE x in []slice". We do this rename so that there is mimimal
confusion in contexts where we use batching along with actual paging.

The config struct is also renamed to QueryConfig in preparation for it
holding more config options.
2025-07-31 15:32:53 +02:00
Oliver Gugger
f7efc15a9e Merge pull request #9625 from MPins/issue-8161
Add deletecanceledinvoice RPC call
2025-07-30 09:14:06 -06:00
MPins
1a9f591b2b itest: add the test for DeleteCanceledInvoice 2025-07-29 13:55:17 -03:00
Boris Nagaev
8723113d27 itest: RegisterSpendNtfn detects reorgs
Added itest "reorg_notifications" which tests that RegisterSpendNtfn behaves as
expected during a reorg. A reorg notification is produced after a reorg affects
the block which has produced a spending notification for this registration.
2025-07-28 20:18:09 -03:00
Elle
90e2116842 Merge pull request #10081 from ellemouton/graphSQLSlices
graph/db: use `/*SLICE:<field_name>*/` to optimise various graph queries
2025-07-22 18:27:10 +02:00
Elle Mouton
2fa30e8735 graph+config: add sql pagination config to ChannelGraph 2025-07-22 17:16:41 +02:00
Oliver Gugger
6b1c85265f lnrpc+rpcserver: add QoL flag for permission check
To make it even more obvious that by default the permissions to check
aren't taken from the full method provided, we add a new flag that does
that on request.
2025-07-21 13:07:43 +02:00
Elle Mouton
21ac7ef6f4 multi: add reset to ForEachNode 2025-07-15 11:25:09 +02:00
Elle Mouton
a2ffa74684 itest: graph sql migration itest
This commit adds a basic itest that is run under the `test_native_sql`
flag. It tests that the migration is idempotent and that the node cant
be restarted without the `db.use-native-sql` flag once the graph
migration has been run.
2025-07-15 06:40:22 +02:00
Elle Mouton
f5b50afb92 itest: make invoice mig helpers re-usable
Refactor to make some of the invoice migration helpers re-usable so that
we can use them for the graph migration itests.
2025-07-15 06:35:24 +02:00
Elle Mouton
223cec442b itest: use random hash gen helper 2025-07-15 06:31:51 +02:00
Elle
add81f1388 Merge pull request #10064 from ellemouton/getChanInfoGrpcErr
rpcserver: return consistent grpc NotFound error for GetChaninfo & LookupInvoice
2025-07-14 08:34:46 +02:00
Oliver Gugger
63609b0801 Merge pull request #10061 from yyforyongyu/fix-listsweep-itest
itest+lntest: fix flake in `testListSweeps`
2025-07-11 00:25:48 -06:00
Torkel Rogstad
c8b04d03f5 itest+lntest: add grpc NotFound error code test 2025-07-10 11:36:20 +02:00
yyforyongyu
52d963bae0 itest+lntest: fix flake in testListSweeps
We now make sure we assert the `ListSweeps` results in a wait closure.
2025-07-09 20:52:02 +03:00
yyforyongyu
c4c519a3ae itest+lncfg: test the quiescence timeout behaivor 2025-07-04 04:20:00 +08:00
yyforyongyu
2a45e8a0fa itest: fix testQuiescence
The original test lets Bob send an HTLC to Alice, but Bob doesn't have
any balance to begin with. This commit now fixes it by explicitly
checking sending payment is allowed before quiescence, and forbidden
after.
2025-07-04 04:19:59 +08:00
Oliver Gugger
e54206f8c2 Merge pull request #9990 from ziggie1984/follow-up-payment-addr-spec-update
itest coverage increase following the spec update regarding MPP payments
2025-06-30 15:45:14 +02:00
Elle Mouton
8cf567b948 multi: use the "errors" package everywhere
Replace all usages of the "github.com/go-errors/errors" and
"github.com/pkg/errors" packages with the standard lib's "errors"
package. This ensures that error wrapping and `errors.Is` checks will
work as expected.
2025-06-30 09:46:55 +02:00
Elle Mouton
34154802f3 routing+itest: fix route blinding path selection bug
Here we fix a bug which would not include the selected incoming blinded
path chain from being included in the selected path set if it meets the
minimum length requirement. The appropriate unit test and itest is
updated to demonstrate the fix.
2025-06-25 12:55:36 +02:00
Elle Mouton
51f1932d48 itest: clean-up partially specified blinded path test
Improve the readability of the existing test.
2025-06-25 12:50:11 +02:00
ziggie
02714f72a0 multi: increase test coverage payments
The BOLT spec was updated and now requires the payment address for
the writer and reader. We increase the test coverage for payments
setting a wrong payment address.
2025-06-24 22:15:07 +02:00
Oliver Gugger
715cae936d Merge pull request #9967 from ellemouton/peerBootstrapItest
itest: test automatic peer bootstrapping
2025-06-24 14:07:51 +02:00
Elle Mouton
4d766c457f itest: add peer bootstrapping itest
Test the automatic peer bootstrapping logic via an itest.
2025-06-24 12:56:46 +02:00
yyforyongyu
0e247641d7 itest: document and fix a wallet utxo flake 2025-06-23 22:18:54 +08:00
yyforyongyu
2c73a3fa7c itest: remove extra UTXO used in sweeping tests
Given #8786 is now fixed, we no longer need extra UTXOs in these tests.
2025-06-23 22:18:31 +08:00
yyforyongyu
9caa5f220d itest+lntest: add more itest for accessman 2025-06-19 16:05:59 +08:00
Abdullahi Yunus
a0634e4ade lnd+lnrpc: update fwdinghistory message
In this commit we update the returned message for fwdinghistory
to include the htlcindex for all forwarded htlcs.
2025-06-06 12:21:46 +01:00
Oliver Gugger
fc906f2a65 Merge pull request #9127 from MPins/issue-8993
Add the option on path creator to specify the incoming channel on blinded path
2025-06-05 08:47:05 +02:00
ziggie
b837c889dc itest: add disconnect test
Add a connect/disconnect test when the peers both started up
with the rbf coop close feature.
2025-05-29 10:19:21 +02:00
yyforyongyu
f97f60d3d4 lntest+itest: add testBumpFeeExternalInput 2025-05-26 19:41:24 +08:00
yyforyongyu
4cef7b30fe itest: add new file lnd_bump_fee.go
Move bumpfee RPC related tests into one file - these tests focus on
testing the behaivor of the RPC only without any force close context.
2025-05-26 19:41:24 +08:00