17 Commits

Author SHA1 Message Date
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
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
413cc3da35 itest: update async coop close itests to also use new rbf flow 2025-03-18 11:44:20 -05: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
ziggie
f458844412
lnd: add max fee rate check to closechannel rpc 2025-02-20 17:43:18 +01:00
ziggie
59443faa36
multi: coop close with active HTLCs on the channel
For the lncli cmd we now always initiate the coop close even if
there are active HTLCs on the channel. In case HTLCs are on the
channel and the coop close is initiated LND handles the closing
flow in the background and the lncli cmd will block until the
transaction is broadcasted to the mempool. In the background LND
disallows any new HTLCs and waits until all HTLCs are resolved
before kicking of the negotiation process.
Moreover if active HTLCs are present and the no_wait param is not
set the error msg is now highlightning it so the user can react
accordingly.
2025-02-20 17:43:18 +01:00
Nishant Bansal
23efbef946
itest: update tests with timeout_seconds
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-01-15 19:46:09 +05:30
yyforyongyu
de8f14bed2
itest: remove the use of standby nodes
This commit removes the usage of the standby nodes and uses
`CreateSimpleNetwork` when applicable. Also introduces a helper method
`NewNodeWithCoins` to quickly start a node with funds.
2024-12-20 19:38:05 +08:00
yyforyongyu
653a8ac55e
lntest+itest: add new method AssertChannelInGraph
This commit replaces `AssertTopologyChannelOpen` with
`AssertChannelInGraph`, which asserts a given channel edge is found.
`AssertTopologyChannelOpen` only asserts a given edge has been received
via the topology subscription, while we need to make sure the channel is
in the graph before continuing our tests.
2024-11-12 23:55:40 +08:00
yyforyongyu
ed3cb26188
itest+lntest: stop using pointer to chainhash.Hash
This commit fixes the methods used in `lntest` so they stop using
pointers to chainhash.
2024-10-17 07:14:51 +08:00
yyforyongyu
6bd8baea38
lntest+itest: continue removing direct call to Miner 2024-07-23 21:30:07 +08:00
yyforyongyu
519a8749ef
lntest: reflect the updated fee estimator in tests 2024-04-19 21:33:21 +08:00
Elle Mouton
785790abed
peer/lnwallet: persist shutdown info on send
In this commit, we start persisting shutdown info when we send the
Shutdown message. When starting up a link, we also first check if we
have previously persisted Shutdown info and if we have, we start the
link in shutdown mode meaning that it will not accept any new outgoing
HTLC additions and it will queue the shutdown message after any pending
CommitSig has been sent.
2024-02-21 11:58:18 +02:00
Elle Mouton
987604effb
itest: demonstrate shutdown on restart bug
This commit adds an itest to demonstrate that the following bug exists:
If channel Shutdown is initiated but then a re-connect is done before
the shutdown is complete, then the initiating node currently does not
properly resend the Shutdown message as required by the spec. This will
be fixed in an upcoming commit.
2024-02-21 11:35:12 +02:00
Elle Mouton
71753af8ee
multi: fix various typos 2024-02-21 11:35:10 +02:00
Keagan McClelland
9e58ebd0fb itest: test that we can close with in-flight htlcs 2024-01-23 12:25:06 -08:00