Commit graph

203 commits

Author SHA1 Message Date
yyforyongyu
7ab4081ffd
lntest: make sure chain backend is synced to miner
We sometimes see `timeout waiting for UTXOs` error from bitcoind-related
itests due to the chain backend not synced to the miner. We now assert
it's synced before continue.
2024-12-20 19:38:14 +08:00
yyforyongyu
31b66962d8
lntest: properly handle shutdown error
This commit removes the panic used in checking the shutdown log.
Instead, the error is returned and asserted in `shutdownAllNodes` so
it's easier to check which node failed in which test. We also catch all
the errors returned from `StopDaemon` call to properly access the
shutdown behavior.
2024-12-20 19:38:14 +08:00
yyforyongyu
becbdce64c
lntest: limit the num of blocks mined in each test 2024-12-20 19:38:13 +08:00
yyforyongyu
5236c05dc6
itest+lntest: add new method FundNumCoins
Most of the time we only need to fund the node with given number of
UTXOs without concerning the amount, so we add the more efficient
funding method as it mines a single block in the end.
2024-12-20 19:38:13 +08:00
yyforyongyu
39104c53d4
lntest: fix flakeness in openChannelsForNodes
We now make sure the channel participants have heard their private
channel when opening channels.
2024-12-20 19:38:09 +08:00
yyforyongyu
010a4f1571
lntest: add human-readble names and check num of nodes 2024-12-20 19:38:06 +08:00
yyforyongyu
00772ae281
itest+lntest: remove standby nodes
This commit removes the standby nodes Alice and Bob.
2024-12-20 19:38:06 +08:00
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
a1bd8943db
lntest+itest: export DeriveFundingShim 2024-12-20 17:54:12 +08:00
yyforyongyu
b7feeba008
itest+lntest: fix channel force close test
Also flatten the tests to make them easier to be maintained.
2024-12-20 17:54:12 +08:00
yyforyongyu
9ab9cd5f99
lntest+itest: start flattening the multi-hop tests
Starting from this commit, we begin the process of flattening the
multi-hop itests to make them easier to be maintained. The tests are
refactored into their own test cases, with each test focusing on testing
one channel type. This is necessary to save effort for future
development.

These tests are also updated to reflect the new `blockbeat` behavior.
2024-12-20 17:54:09 +08:00
Keagan McClelland
ed2989ae33
multi: update to fn v2 2024-12-04 13:19:00 -07: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
7dda2960a5
lntest: update the block height of HarnessTest during start 2024-11-12 23:55:40 +08:00
yyforyongyu
2905e7b3df
lntest+itest: kill node and wait its process
Fix a flake found in `testRPCMiddlewareInterceptor` when running in
macOS.
2024-11-12 23:55:40 +08:00
yyforyongyu
6ac588e655
lntest: remove an invalid check
`openChannelsForNodes` is called inside `openZeroConfChannelsForNodes`
so this value can be true.
2024-11-12 14:46:30 +08:00
yyforyongyu
35992e1503
lntest+itest: expore method createSimpleNetwork
So it can be used via `ht.CreateSimpleNetwork`.
2024-11-11 20:57:49 +08:00
yyforyongyu
a745d74e7c
lntest: make sure standby nodes' edges are cleaned 2024-11-11 20:54:10 +08:00
ziggie
7b2da94750
multi: deprecate dust-treshold config value
Replace ambigious config value "dust-treshold" with a more clear
"channel-max-fee-exposure" exposure value. The old value is
deprecated and will be removed in the near future.
2024-11-06 18:16:06 +01:00
yyforyongyu
21535826ba
lntest: remove redundant MineBlocks 2024-10-29 15:31:21 +08:00
Oliver Gugger
5f20fd4d9f
lntest: shutdown all nodes at end of test
Fixes an issue where the standby nodes would keep running even after the
test finished (successfully or with a failure).
2024-10-22 18:12:16 +02: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
ffranr
0c6a1558d5
lntest: add HtlcModifier support to node RPC harness
This commit enhances the itest LND node harness to include support for
the new `HtlcModifier` RPC endpoint.
At the same time we move another method to the correct file.
2024-09-19 09:21:38 +02:00
yyforyongyu
677f2c390a
lntest: re-define CleanupForceClose
To reflect the new sweeping behavior, also makes it easier to be used as
we need to method to quickly cleanup force closes without concerning the
details when we are not testing the force close behavior.
2024-08-07 22:19:23 +08:00
yyforyongyu
941716d60e
lntest+itest: add new test testPaymentHTLCTimeout
This commit adds a new test case to validate that when an HTLC has timed
out, the corresponding payment is marked as failed.
2024-08-07 22:17:58 +08:00
yyforyongyu
a1d71afde8
lntest: allow specifying min relay feerate in itest 2024-07-24 20:05:00 +08:00
yyforyongyu
623f816f8e
lntest: remove redundant nodes shutdown
The nodes are already shut down in the `Cleanup` in `ht.Subtest` so
there's no need to shutdown them again.
2024-07-23 21:30:08 +08:00
yyforyongyu
f1f341095e
lntest+itest: add new method CurrentHeight 2024-07-23 21:30:08 +08:00
yyforyongyu
14e7b134d9
lntest+itest: make Miner a private instance 2024-07-23 21:30:08 +08:00
yyforyongyu
6bd8baea38
lntest+itest: continue removing direct call to Miner 2024-07-23 21:30:07 +08:00
yyforyongyu
976bb37972
lntest+itest: add method AssertNumTxsInMempool and AssertTxInBlock
in harness

Prepare to make `HarnessTest.Miner` a private instance to sync height.
2024-07-23 21:30:07 +08:00
yyforyongyu
e553895ddd
lntest+itest: strictly define the behavior of MineBlocks
This commit adds more assertion to `MineBlocks` so the caller won't
misuse it.
2024-07-23 21:30:07 +08:00
yyforyongyu
91b20e661b
lntest: move mining methods into one file 2024-07-23 21:30:07 +08:00
yyforyongyu
a881477404
lntest: create new package lntest/miner for itest miner
This commit moves the `HarnessMiner` into a new package to avoid
confusion about incoming changes.
2024-07-23 21:30:07 +08:00
Keagan McClelland
56048133f2 itest+lntest: add itest to reproduce bug #8535 2024-06-05 12:56:04 -07:00
yyforyongyu
55452f64e8
lntest: wait for mempool update after mining txns 2024-06-04 09:07:43 +02:00
yyforyongyu
8da68bb7db
multi: apply the new type lntypes.WeightUnit 2024-05-25 13:37:13 +08:00
Olaoluwa Osuntokun
e8031fdccf
lnrpc: ensure parsing of the Amp flag for payments is consistent
In this commit, we fix an inconsistent in the API related to AMP
payments. When a payment request isn't specified, we require the `--amp`
flag on the CLI to make an AMP payment. However, for payment requests,
we don't require this flag. To fix this inconsistency, we now require
the `--amp` flag to _also_ be set for payment requests.
2024-04-25 16:16:16 -07:00
ziggie
351e9a68dd
multi: Add tests to psbt and normal open channel flow.
Itests were added to the normal channel funding flow and the psbt
funding flow using unstable (unconfirmed sweeper inputs).
2024-04-24 13:58:20 +01:00
yyforyongyu
d854c80aa7
itest+lntest: fix itest re the new sweeping behavior 2024-04-20 04:41:29 +08:00
yyforyongyu
6f55a7af05
itest: add new test to check BumpFee and PendingSweeps 2024-04-19 21:33:38 +08:00
yyforyongyu
f68c14321b
itest: fix multi-hop itest 2024-04-19 21:33:36 +08:00
yyforyongyu
ce58175314
itest+lntest: fix channel force close itest 2024-04-19 21:33:36 +08:00
yyforyongyu
94e0e32c74
multi: add itest testSweepAnchorCPFPLocalForceClose
This commit adds an itest case that focuses on validating the CPFP logic
in anchor sweeping.
2024-04-19 21:33:36 +08:00
yyforyongyu
94390fc775
itest: fix existing itests 2024-04-19 21:33:29 +08:00
yyforyongyu
521b1fc34a
itest+lntest: fix itest re the new block driven behavior 2024-04-19 21:33:26 +08:00
yyforyongyu
519a8749ef
lntest: reflect the updated fee estimator in tests 2024-04-19 21:33:21 +08:00
Olaoluwa Osuntokun
716c6dddd8
Merge pull request #8052 from bhandras/sql-invoices
sqldb: `InvoiceDB` implementation
2024-03-06 21:15:14 -06:00
Slyghtning
ef069b658d
itest: preparatory fee estimation changes 2024-03-05 09:24:27 +01:00
Andras Banki-Horvath
ba8e7550d5
itest: add the -nativesql flag to run SQL itests with native SQL tables 2024-03-01 10:08:10 +01:00