Commit Graph

1274 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
73574d919d lntest: add timeouts for windows
For Windows the tests run much slower so we create customized timeouts
for them.
2024-12-20 19:38:14 +08:00
yyforyongyu
d7f8fa6ab6 lntest: increase port timeout 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
77b2fa0271 lntest: make sure policies are populated in AssertChannelInGraph 2024-12-20 19:38:13 +08:00
yyforyongyu
c97c31a70b lntest: increase node start timeout and payment benchmark timeout 2024-12-20 19:38:12 +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
cfb5713cda itest+lntest: fix flake in MPP-related tests 2024-12-20 19:38:09 +08:00
yyforyongyu
f912f407c8 lntest: increase rpcmaxwebsockets for btcd
This has been seen in the itest which can lead to the node startup
failure,
```
2024-11-20 18:55:15.727 [INF] RPCS: Max websocket clients exceeded [25] - disconnecting client 127.0.0.1:57224
```
2024-12-20 19:38:09 +08:00
yyforyongyu
7ceb9a4af5 lntest+itest: remove AssertNumActiveEdges
This is no longer needed since we don't have standby nodes, plus it's
causing panic in windows build due to `edge.Policy` being nil.
2024-12-20 19:38:08 +08:00
yyforyongyu
010a4f1571 lntest: add human-readble names and check num of nodes 2024-12-20 19:38:06 +08:00
yyforyongyu
f64b2ce8f2 lntest: make sure node is properly shut down
Soemtimes the node may be hanging for a while without being noticed,
causing failures in its following tests, thus making the debugging
extrememly difficult. We now assert the node has been shut down from the
logs to assert the shutdown process behaves as expected.
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
c4a6abb14d lntest+itest: remove the usage of ht.AssertActiveHtlcs
The method `AssertActiveHtlcs` is now removed due to it's easy to be
misused. To assert a given htlc, use `AssertOutgoingHTLCActive` and
`AssertIncomingHTLCActive` instead for ensuring the HTLC exists in the
right direction. Although often the case `AssertNumActiveHtlcs` would be
enough as it implicitly checks the forwarding behavior for an
intermediate node by asserting there are always num_payment*2 HTLCs.
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
d7b2025248 lntest+itest: flatten testMultiHopRemoteForceCloseOnChainHtlcTimeout 2024-12-20 17:54:10 +08:00
yyforyongyu
bef17f16cf lntest+itest: flatten testMultiHopLocalForceCloseOnChainHtlcTimeout 2024-12-20 17:54:10 +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
yyforyongyu
40ac04a254 lntest+itest: fix testSweepCPFPAnchorOutgoingTimeout 2024-12-20 17:54:08 +08:00
Keagan McClelland
ed2989ae33 multi: update to fn v2 2024-12-04 13:19:00 -07:00
Elle Mouton
755ad49440 build: Append commit hash to the main LND context
It can be disabled via the new `logging.no-commit-hash` config option.
2024-12-02 09:23:06 +02:00
Elle Mouton
ab7aae0708 multi: rename nolint:lll to nolint:ll
Find and replace all nolint instances refering to the `lll` linter and
replace with `ll` which is the name of our custom version of the `lll`
linter which can be used to ignore log lines during linting.

The next commit will do the configuration of the custom linter and
disable the default one.
2024-12-02 09:14:21 +02:00
Keagan McClelland
77fd8c6a21 itest+lntest: add itest for Quiesce RPC method 2024-11-26 13:52:51 -07:00
Keagan McClelland
99f5ca4018 lnrpc add new RPC 'Quiesce' to protobuf definitions 2024-11-26 13:51:57 -07:00
Carla Kirk-Cohen
774bfa740a htlcswitch: relay experimental endorsement signal with update_add_htlc 2024-11-22 09:16:56 -05:00
Abdullahi Yunus
762d01536b multi: return txns first and last indices
In this commit we introduce first and last indices for the
tranasctions returned which can be used to seek for further
transactions in a pagination style.

Signed-off-by: Abdullahi Yunus <abdoollahikbk@gmail.com>
2024-11-22 08:22:55 +01:00
Abdullahi Yunus
cd1df4ac34 multi: modify listtxn definition
This commit modifies listtransactiondetails method definition to
take in additional params: index_offset and maxTxn
2024-11-22 08:21:27 +01:00
Elle
d14f4c7e1f Merge pull request #9279 from ellemouton/misc
misc: nil checks and remove deprecated default values
2024-11-19 10:37:01 +02:00
Elle Mouton
90ed0fe54c lntest: nil check edges 2024-11-18 21:09:16 +02:00
Olaoluwa Osuntokun
b9105c35e5 lntest: print node PID when launching in itests
In this commit, we start to print the PID of node's we created within an
itest. This is useful when debugging itests with `dlv` by attaching to a
given node. By printing out the PID, we facilitate such debugging
attempts.
2024-11-15 17:21:43 -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
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
90bca1022b lntest: retry finding the payment from ListPayments 2024-11-12 23:55:40 +08:00
yyforyongyu
4506fd30cb lntest: change the nodeCounter to be atomic 2024-11-12 23:55:13 +08:00
yyforyongyu
cc6ff150b9 lntest: remove deprecated config --profile 2024-11-12 14:46:31 +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
d27ff34b04 lntest+itest: rename AssertNumEdges to AssertNumActiveEdges
To properly reflect what the assertion is.
2024-11-11 20:57:49 +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
yyforyongyu
e7d0754615 lntest: make sure minRelayFeerate is reset
So every test starts with the default minRelayFeerate.
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
bf8ae68eea lntest: add method AssertTxnsNotInMempool
So we only need to do one `GetRawMempool` lookup when checking the
exclusion of multiple txns.
2024-10-17 07:34:40 +08:00
yyforyongyu
e560e00aeb lntest: remove unused return value 2024-10-17 07:34:25 +08:00