Commit Graph

23 Commits

Author SHA1 Message Date
yyforyongyu
d854c80aa7
itest+lntest: fix itest re the new sweeping behavior 2024-04-20 04:41:29 +08:00
yyforyongyu
f68c14321b
itest: fix multi-hop itest 2024-04-19 21:33:36 +08:00
yyforyongyu
521b1fc34a
itest+lntest: fix itest re the new block driven behavior 2024-04-19 21:33:26 +08:00
Keagan McClelland
109265c77a multi: make static remote key compulsory 2024-01-11 13:58:01 -08:00
yyforyongyu
ded9fe6a84
itest: fix flake in multi_hop_htlc_remote_chain_claim 2023-11-17 17:29:53 +08:00
yyforyongyu
fc52a01055
itest: fix test flake in testHtlcTimeoutResolverExtractPreimageRemote
From the build,
```
harness_miner.go:218:
        	Error Trace:	/home/runner/work/lnd/lnd/lntest/harness_miner.go:218
        	            				/home/runner/work/lnd/lnd/lntest/harness.go:1641
        	            				/home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:2207
        	            				/home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:152
        	Error:      	Received unexpected error:
        	            	want 2, got 3 in mempool: [a7cbb5724e39579cfc75d0469270f691988cb67fcc51a332256cafb193cf40bd b12a03a0622a3cf7d53867f060a6de8166e564a1a3109bc2be1ec0b720f305da 073d66885ccded1a770dc9aa5f1d44c8e10ac4e916e5ab50ef5149a5649ec8ba]
        	Test:       	TestLightningNetworkDaemon/tranche03/130-of-135/neutrino/htlc_timeout_resolver_extract_preimage_remote/zeroconf=false/committype=SIMPLE_TAPROOT
        	Messages:   	assert tx in mempool timeout
    harness.go:339: finished test: htlc_timeout_resolver_extract_preimage_remote, start height=1312, end height=1347, mined blocks=35
```
2023-10-31 23:49:31 +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
Oliver Gugger
d16e7a5eef
itest: add itest for externally funded taproot chans 2023-09-26 21:45:17 +02:00
Olaoluwa Osuntokun
a87631c957
itest: add case for taproot chans to htlc timeout resolver itests 2023-08-22 17:43:51 -07:00
Olaoluwa Osuntokun
7506383074
itest: update zero conf multi-hop tests to remove extra blocks mined
In the master branch, the blocks are mined earlier, so we don't need to
mine an extra set.
2023-08-22 16:34:42 -07: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
7c5be4d056
itest: add taproot support for all variants of runMultiHopHtlcClaimTest 2023-08-22 16:34:06 -07:00
yyforyongyu
9ae4511a6f
itest: make sure invoice is settled in multi hop htlc test 2023-05-24 02:38:40 +08:00
yyforyongyu
c6cfc425a0
lntest+itest: clean mempool in testHtlcTimeoutResolverExtractPreimageRemote 2023-05-20 00:33:04 +08:00
yyforyongyu
1dc66302cd
itest: fix test flake in testHtlcTimeoutResolverExtractPreimageRemote 2023-05-10 02:01:54 +08:00
yyforyongyu
e018c02d40
itest: refactor createThreeHopNetwork to open channels async
This will save us 6 blocks each time we call this function.
2023-05-09 21:41:53 +08:00
yyforyongyu
e715b8ed1f
itest+lntest: add itest for mempool preimage watch 2023-04-19 01:18:19 +08: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