Commit Graph
311 Commits
Author SHA1 Message Date
yyforyongyu e7310ff1b6 itest: fix testOpenChannelUpdateFeePolicy
This commit fixes a misuse of `ht.Subtest`, where the nodes should
always be created inside the subtest.
2024-12-20 19:38:06 +08:00
yyforyongyu 72f3f41d41 itest: remove unnecessary channel close and node shutdown
Since we don't have standby nodes anymore, we don't need to close the
channels when the test finishes. Previously we would do so to make sure
the standby nodes have a clean state for the next test case, which is no
longer relevant.
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 11c9dd5ff2 itest: remove unused method setupFourHopNetwork 2024-12-20 19:38:05 +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 3eda87fff9 itest: remove direct reference to stanby nodes
Prepares the upcoming refactor. We now never call `ht.Alice` directly,
instead, we always init `alice := ht.Alice` so it's easier to see how
they are removed in a following commit.
2024-12-20 19:38:05 +08:00
yyforyongyu 88bd0cb806 itest: shuffle test cases to even out blocks mined in tranches
This commit adds a new flag to shuffle all the test cases before running
them so tests which require lots of blocks to be mined are less likely
to be run in the same tranch.

The other benefit is this approach provides a more efficient way to
figure which tests are broken since all the differnet backends are
running different tranches in their builds, we can identify more failed
tests in one push.
2024-12-20 19:38:05 +08:00
yyforyongyu 2c27df6c30 itest: print num of blocks for debugging 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 36a87ad5f4 itest: assert payment status after sending 2024-12-20 17:54:12 +08:00
yyforyongyu 425877e745 itest: remove redundant block in multiple tests 2024-12-20 17:54:12 +08:00
yyforyongyu 9c0c373b7e itest: flatten and fix testWatchtower 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 9d4a60d613 itest: remove redundant blocks in channel backup tests 2024-12-20 17:54:12 +08:00
yyforyongyu a55408d4a1 itest: remove redudant block in testPsbtChanFundingWithUnstableUtxos 2024-12-20 17:54:11 +08:00
yyforyongyu 22b9350320 itest: remove redunant block mining in testChannelFundingWithUnstableUtxos 2024-12-20 17:54:11 +08:00
yyforyongyu 2494f1ed32 itest: remove redundant block mining in testFailingChannel 2024-12-20 17:54:11 +08:00
yyforyongyu e1d5bbf171 itest: remove unnecessary force close 2024-12-20 17:54:11 +08:00
yyforyongyu 2adb356668 itest: rename file to reflect the tests 2024-12-20 17:54:11 +08:00
yyforyongyu 2f0256775e itest: flatten testHtlcTimeoutResolverExtractPreimageRemote
Also remove unused code.
2024-12-20 17:54:11 +08:00
yyforyongyu 34951a6153 itest: flatten testHtlcTimeoutResolverExtractPreimageLocal
This commit simplfies the test since we only test the preimage
extraction logic in the htlc timeout resolver, there's no need to test
it for all different channel types as the resolver is made to be
oblivious about them.
2024-12-20 17:54:10 +08:00
yyforyongyu f95e64f084 itest: flatten testMultiHopHtlcAggregation 2024-12-20 17:54:10 +08:00
yyforyongyu 52e6fb1161 itest: flatten testMultiHopHtlcRemoteChainClaim 2024-12-20 17:54:10 +08:00
yyforyongyu 8dd73a08a9 itest: flatten testMultiHopHtlcLocalChainClaim 2024-12-20 17:54:10 +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 bc31979f7b itest: simplify and flatten testMultiHopReceiverChainClaim 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 e45005b310 itest: fix testPaymentSucceededHTLCRemoteSwept 2024-12-20 17:54:09 +08:00
yyforyongyu 0778009ac2 itest: fix testBumpForceCloseFee 2024-12-20 17:54:09 +08:00
yyforyongyu 1aeea8a90f itest: fix testSweepCommitOutputAndAnchor 2024-12-20 17:54:09 +08:00
yyforyongyu d260a87f3b itest: fix testSweepHTLCs 2024-12-20 17:54:09 +08:00
yyforyongyu cacf222e11 itest: fix testSweepCPFPAnchorIncomingTimeout 2024-12-20 17:54:09 +08:00
yyforyongyu 40ac04a254 lntest+itest: fix testSweepCPFPAnchorOutgoingTimeout 2024-12-20 17:54:08 +08:00
Alex Akselrod 211dd21082 itest: fix flake in multi-hop payments
To make this itest work reliably with multiple parallel SQL
transactions, we need to count both the settle and final HTLC
events. Otherwise, sometimes the final events from earlier
forwards are counted before the forward events from later
forwards, causing a miscount of the settle events. If we
expect both the settle and final event for each forward,
we don't miscount.
2024-12-12 10:40:35 -08:00
Keagan McClelland ed2989ae33 multi: update to fn v2 2024-12-04 13:19:00 -07: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
Elle Mouton fd2ea411be itest: assert no failed updates in test
So that this fails earlier on if the actual call to UpdateChannelPolicy
fails.
2024-11-28 13:51:14 +02:00
Keagan McClelland 77fd8c6a21 itest+lntest: add itest for Quiesce RPC method 2024-11-26 13:52:51 -07:00
Elle fbeab726e1 Merge pull request #8390 from carlaKC/7883-experimental-endorsement
Add Experimental Endorsement Signalling
2024-11-26 09:43:22 +02:00
w3irdrobot d3bff47167 docs: fix broadcast misspelling 2024-11-22 16:20:02 -05:00
Carla Kirk-Cohen 7a876e8898 itest: add coverage for experimental endorsement 2024-11-22 09:31:46 -05:00
Carla Kirk-Cohen 4bb5b0c27c lnrpc: set a zero value endorsement signal on sender outgoing htlc
Before we have sufficient signaling in the network to relay this
signal, set a zero value experimental endorsement value on the sender's
outgoing htlc. Once the network is relaying this signal and a flag day
has been set, we'll be able to set a non-zero value here.
2024-11-22 09:16:57 -05:00
Carla Kirk-Cohen 774bfa740a htlcswitch: relay experimental endorsement signal with update_add_htlc 2024-11-22 09:16:56 -05:00
Boris Nagaev 64c660c19e itest: test "lnd --debuglevel=show" command
Tests that "lnd --debuglevel=show" command works and prints the list of
supported subsystems.
2024-11-19 12:44:57 -03: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 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 7dd9a17625 lntest+itest: fix testUpdateChanStatus 2024-11-11 20:57:50 +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