Commit Graph

38 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
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
yyforyongyu
061b7abf76 itest: document the flake found in preimage extraction
We now use dedicated methods to properly document the flakes in *one*
place.
2025-03-05 18:54:13 +08:00
yyforyongyu
c61f781be7 itest: split up force close tests
So we can focus on testing normal flow vs persistence flow.
2025-02-20 14:40:54 +08:00
yyforyongyu
bc8c1643c6 itest: move channel force closes into one sub test var 2025-01-26 09:16:02 +08: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
762e59d78c itest: fix flake for neutrino backend 2024-12-20 19:38:07 +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
36a87ad5f4 itest: assert payment status after sending 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
2494f1ed32 itest: remove redundant block mining in testFailingChannel 2024-12-20 17:54:11 +08: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
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
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
be4dba5da6 lntest+itest: finalize moving miner methods 2024-07-23 21:30:07 +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
955670fcc2 itest: provide a temporary fix to unblock CI 2024-06-14 15:18:20 +08:00
yyforyongyu
4079f61d7e itest+sweep: fix current itest re anchor deadline 2024-05-21 00:53:20 +08:00
yyforyongyu
d854c80aa7 itest+lntest: fix itest re the new sweeping behavior 2024-04-20 04:41:29 +08:00
yyforyongyu
ce58175314 itest+lntest: fix channel force close itest 2024-04-19 21:33:36 +08:00
yyforyongyu
6933c5a86c itest: remove old CPFP tests
The old commitment deadline is removed as it's no longer relevant.
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
Andras Banki-Horvath
187e61da23 itests: add itest for ListSweeps's start_height 2024-02-01 21:02:25 +01:00
Jesse de Wit
b6616bc040 itest: assert closing tx is set in waiting_close_channels 2024-01-29 14:16:51 +01:00
Keagan McClelland
109265c77a multi: make static remote key compulsory 2024-01-11 13:58:01 -08:00
yyforyongyu
0816f9124c itest: update itest to reflect new sweeper behavior 2023-10-23 13:01:50 +08:00
Yong
939375f1a5 sweeper: relax anchor sweeping when there's no deadline pressure (#7965)
* sweep: use longer variable name for clarity in `addToState`

* sweeper: add more docs and debug logs

* sweep: prioritize smaller inputs when adding wallet UTXOs

This commit sorts wallet UTXOs by their values when using them for
sweeping inputs. This way we'd avoid locking large UTXOs when sweeping
inputs and also provide an opportunity to aggregate wallet UTXOs.

* contractcourt+itest: relax anchor sweeping for CPFP purpose

This commit changes from always sweeping anchor for a local force close
to only do so when there is an actual time pressure. After this change,
a forced anchor sweeping will only be attempted when the deadline is
less than 144 blocks.

* docs: update release notes

* itest: update test `testMultiHopHtlcLocalChainClaim` to skip CPFP

Since we now only perform CPFP when both the fee rate is higher and the
deadline is less than 144, we need to update the test to reflect that
Bob will not CPFP the force close tx for the channle Alice->Bob.

* itest: fix `testMultiHopRemoteForceCloseOnChainHtlcTimeout`

* itest: update related tests to reflect anchor sweeping

This commit updates all related tests to reflect the latest anchor
sweeping behavior. Previously, anchor sweeping is always attempted as
CPFP when a force close is broadcast, while now it only happens when the
deadline is less than 144. For non-CPFP purpose sweeping, it will happen
after one block is mined after the force close transaction is confirmed
as the anchor will be resent to the sweeper with a floor fee rate, hence
making it economical to sweep.
2023-10-12 17:18:59 +02:00
Olaoluwa Osuntokun
94f45b2b82 itest: use explicit chan type negotiation for taproot chan cases
The prior commit removed implicit negotiation, so we'll need to make
sure to use the explicit chan type feature vector when we go to
negotiate.
2023-08-22 16:34:31 -07:00
Olaoluwa Osuntokun
a2b277cf1d multi: fix linter errors 2023-08-22 16:34:15 -07:00
Olaoluwa Osuntokun
5379823346 itest: add taproot chans to testChannelForceClosure 2023-08-22 16:34:00 -07:00
yyforyongyu
2bc6aabf96 itest: fix make lint
This commit fixes the issues reported by the linter.
2023-02-23 21:56:10 +08:00
yyforyongyu
9d1d629001 itest+lntest: migrate lntemp to lntest
This commit performs the takeover that `lntemp` is now promoted to be
`lntest`, and the scaffolding is now removed as all the refactoring is
finished!
2023-02-23 21:56:09 +08:00
yyforyongyu
4a9c3449a6 lntemp+itest: move utils function into lntemp 2023-02-23 21:56:09 +08:00
yyforyongyu
94c64a886e lntemp+itest: remove unused code to prepare lntemp's takeover
This commit removes the old code living in `lntest` to prepare
`lntemp`'s takeover.
2023-02-23 21:56:08 +08:00
yyforyongyu
0bc86a3b4b multi: move itest out of lntest
This commit moves all the test cases living in `itest` out of `lntest`,
further making `lntest` an independent package for general testing.
2023-02-23 21:56:08 +08:00