Commit Graph

432 Commits

Author SHA1 Message Date
Elle Mouton
9b877b94c3 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-07-01 20:08:12 +02:00
yyforyongyu
c4116e1438 itest+lntest: add more itest for accessman 2025-06-20 15:50:25 -07:00
Abdullahi Yunus
768911c46f 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-20 15:37:24 -07:00
ziggie
275ab7da1d itest: add disconnect test
Add a connect/disconnect test when the peers both started up
with the rbf coop close feature.
2025-06-04 12:19:41 +02:00
yyforyongyu
92279e87ae lntest+itest: add testBumpFeeExternalInput 2025-06-04 12:17:54 +02:00
yyforyongyu
6afdda837c 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-06-04 12:17:54 +02:00
yyforyongyu
8f936aa9eb itest: update num of sweeps in AssertNumPendingSweeps
Since we now return all sweeps, we need to update the call to include
immature sweeps.
2025-04-29 14:15:31 +08:00
Boris Nagaev
c9b5974341 itest: test imported address in coop close
Make sure that an address imported to LND via ImportTapscript or ImportPublicKey
can be used as a delivery address in coop close.

New test cases:
 - P2TR address imported with ImportTapscript
 - P2TR address imported with ImportPublicKey
 - P2WPKH address imported with ImportPublicKey

Safeguard against https://github.com/lightninglabs/loop/issues/923
2025-04-23 11:53:29 -03:00
Boris Nagaev
6451ce495a itest: use prefixed sub-tests
More sub-tests are needed in "coop close with external delivery" itest, which
would break the limit for 50 blocks mined. Turning it into prefixed itest.

Also used new exclusion approach in test "remote signer" where all the prefixed
tests are excluded.
2025-04-23 11:52:39 -03:00
Oliver Gugger
fba64c812b itest: test RPCMiddleware gRPC metadata propagation
Expand the rpc middleware test to assert gRPC metadata pair propagation
for rpc middleware requests.
2025-04-22 15:03:17 +02:00
András Bánki-Horváth
579f6f0f68 Merge pull request #9724 from bhandras/fundpsbt-custom-input-lock
walletrpc: allow custom lock ID and duration in `FundPsbt`
2025-04-17 17:31:48 +02:00
Andras Banki-Horvath
fbe645f96a itests: add FundPsbt custom lock ID and duration test 2025-04-17 15:25:12 +02:00
Oliver Gugger
a304be6bad Merge pull request #9715 from ellemouton/removeChanClean
itest: remove manual channel closures from route blinding tests
2025-04-17 14:00:08 +02:00
yyforyongyu
9d7b55ed4f itest: add wallet-related itest 2025-04-17 09:32:28 +08:00
Elle Mouton
b13f22be6b itest: remove manual channel closures from route blinding tests
The itest framework now handles the closure of any channels opened
during the test and so we dont need to manually close them. The manual
closure code in the route blinding tests were resulting in the
occasional test flake.
2025-04-14 17:11:24 +02:00
Olaoluwa Osuntokun
1fc2c64770 itest: test all combos of rbf close and taproot chans
In this commit, we test all the combinations of rbf close and taproot
chans. This ensures that the downgrade logic works properly.

Along the way we refactor the tests slightly, and also split them up, as
running all the combos back to back mines more than 50 blocks in a test,
which triggers an error in the itest sanity checks.
2025-04-03 16:23:36 -07:00
yyforyongyu
8ad122bd03 itest: add testBumpFeeLowBudget 2025-03-26 18:24:47 +08:00
yyforyongyu
64f7a7f3d0 lntest+itest: update block height in MineBlockWithTx
Make sure we update the harness's current height and assert nodes have
been synced. Also fixes some typo found.
2025-03-26 18:24:47 +08:00
yyforyongyu
883381d266 lntest+itest: return the tx from FundCoins
This is used is a following test.
2025-03-26 18:24:46 +08:00
yyforyongyu
4abc1461ad itest: refactor runBumpFee to fix a flake
Make sure we assertPendingSweepResp in a wait call to wait for the
updated resp.
2025-03-26 18:24:46 +08:00
Oliver Gugger
cf35be847c Merge pull request #9626 from ziggie1984/payment-lifecycle-small-fix
payment lifecycle small fix
2025-03-25 08:15:48 -06:00
Oliver Gugger
af2f11edff Merge pull request #9544 from lightningnetwork/elle-graphCacheBase
graph: move graph cache out of CRUD layer
2025-03-25 07:43:06 -06:00
ziggie
013e408abe multi: make validation for keysend stricter 2025-03-25 04:42:03 -05:00
ziggie
b010e95445 itest: add itest to test duplicate failure notification 2025-03-24 09:17:09 -05:00
Elle Mouton
8c11ca97e1 itest: rename closure for clarity 2025-03-24 15:05:47 +02:00
yyforyongyu
ea66dacc07 itest: skip force close restart in windows 2025-03-21 08:06:19 +08:00
yyforyongyu
feeb9acaa7 itest: document flakeRaceInBitcoinClientNotifications 2025-03-21 08:06:19 +08:00
yyforyongyu
533aeb8a25 itest: remove flakeFundExtraUTXO 2025-03-21 08:06:18 +08:00
yyforyongyu
652d39dcc7 itest: fix flakeSkipPendingSweepsCheckDarwin
Now that we have the new RPC to assert the HTLC state, this flake should
be fixed.
2025-03-21 03:25:24 +08:00
yyforyongyu
5a72d5258f htlcswitch+itest: catch link quit signal when processing hodlQueue
This commit makes sure when processing resolutions, e.g, settling
invoices, when the link is already broken, the process would exit with
an error. This fixes the issue we found in the itest, where an
unexpected empty remote pending commitment was created although the
remote peer is already offline.
2025-03-21 03:25:24 +08:00
yyforyongyu
be4c4cc8ff multi: improve logging 2025-03-21 03:24:26 +08:00
Yong
09b6745086 Merge pull request #9600 from lightningnetwork/yy-more-flakes
lntest+itest: document and fix more flakes
2025-03-21 03:23:02 +08:00
Olaoluwa Osuntokun
971ac5a14d itest: add new RBF coop close itest
The itest has both sides try to close multiple times, each time with
increasing fee rates. We also test the reconnection case, bad RBF
updates, and instances where the local party can't actually pay for
fees.
2025-03-18 11:44:57 -05:00
Olaoluwa Osuntokun
fbc67f7610 lntest+itest: extend CloseChannelAssertPending
In this commit, we extend `CloseChannelAssertPending` with new args that
returns the raw close status update (as we have more things we'd like to
assert), and also allows us to pass in a custom fee rate.
2025-03-18 11:44:21 -05:00
Olaoluwa Osuntokun
413cc3da35 itest: update async coop close itests to also use new rbf flow 2025-03-18 11:44:20 -05:00
yyforyongyu
1db110f4cb itest: fix flake in testFundingExpiryBlocksOnPending
We need to make sure to wait for the RPC to show the updated results.
2025-03-18 20:24:34 +08:00
yyforyongyu
d122a2ecc6 itest+lntest: add flakePaymentStreamReturnEarly
Fix the flake found in the `testRelayingBlindedError` and documents the
flake found in other tests in one place.
2025-03-18 20:24:34 +08:00
yyforyongyu
e0296083ca itest+lntest: fix flake in coopCloseWithHTLCsWithRestart
Previously we'd restart Alice and then restart Bob, which means once
Alice is shut down and started again before we shut down Bob, Bob will
attempt to connect Alice since the connection is permanent, which could
put the node in a weird state. We now make sure both nodes are shut down
first, then bring them back online to avoid the above case. We may,
however, create another test in the future to check the above case if needed.
2025-03-18 20:24:34 +08:00
yyforyongyu
a067aa45ef itest: add flakeInconsistentHTLCView 2025-03-18 20:24:33 +08:00
Slyghtning
26a4562263 itest: test for ip range checks for macaroons 2025-03-13 09:57:41 -05:00
Eugene Siegel
d5ecad3834 itest: new test to check server access perms 2025-03-11 20:42:35 -04:00
yyforyongyu
d0abfbbaff itest: remove redundant resume action
Removed a redundant resume action found in
`testForwardInterceptorRestart`, which was put there likely due to a
mistake.
2025-03-10 16:58:16 +08:00
Oliver Gugger
115b452abe Merge pull request #9562 from NishantBansal2003/test-num-block-fund
Make MaxWaitNumBlocksFundingConf Configurable for itest
2025-03-07 12:35:30 -06:00
Nishant Bansal
4569c07e08 multi: Add itest for funding timeout
This commit adds an integration test that
verifies the funding timeout behavior in the
funding manager, in dev/integration test.
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-03-07 21:32:38 +05:30
yyforyongyu
95569df92e itest: document a flake found on macOS 2025-03-06 22:46:31 +08:00
yyforyongyu
0f8f092ddd itest: document a flake from TxNotifier 2025-03-06 09:11:30 +08:00
yyforyongyu
2f545717c9 itest: remove old TODOs
As they are fixed now.
2025-03-06 09:11:30 +08:00
yyforyongyu
f349323923 itest: move test testDisconnectingTargetPeer
Hence finish an old TODO.
2025-03-06 09:11:30 +08:00
yyforyongyu
4755eff0a8 itest: remove time.Sleep before closing channels
Remove an old TODO, which has been fixed with the `NoWait` flag for coop
close.
2025-03-06 09:11:13 +08:00
yyforyongyu
ec7c36fd6a itest: document missing wallet UTXO 2025-03-05 18:54:13 +08:00