lnd/sweep
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
..
backend_mock_test.go sweep: remove conflicted sweep txns from the rebroadcaster 2023-04-21 11:53:08 -07:00
bucket_list.go sweep: do not combine exclusive and non-exclusive inputs 2020-09-16 08:17:36 +02:00
defaults.go sweep+itest: change MaxFeeRate to use SatPerVbyte 2023-10-06 16:34:47 -07:00
fee_estimator_mock_test.go chainfee: create new chainfee package extracting fees from lnwallet 2019-10-31 16:41:57 -07:00
interface.go sweep: remove conflicted sweep txns from the rebroadcaster 2023-04-21 11:53:08 -07:00
log.go multi: modify sweeper.CreateSweepTx to accept conf target, style changes 2018-10-18 18:08:27 -07:00
setup_test.go channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
store_mock.go sweep: Remove publishing last-tx logic. 2023-08-15 10:00:29 +02:00
store_test.go sweep: Remove publishing last-tx logic. 2023-08-15 10:00:29 +02:00
store.go sweep: Remove publishing last-tx logic. 2023-08-15 10:00:29 +02:00
sweeper_test.go multi: make sure CPFP won't exceed max allowed fee rate 2023-10-06 16:34:47 -07:00
sweeper.go sweeper: relax anchor sweeping when there's no deadline pressure (#7965) 2023-10-12 17:18:59 +02:00
test_utils.go chainntfns: add new option for conf notifications to send block 2022-08-01 19:59:21 -07:00
tx_input_set_test.go multi: make sure CPFP won't exceed max allowed fee rate 2023-10-06 16:34:47 -07:00
tx_input_set.go sweeper: relax anchor sweeping when there's no deadline pressure (#7965) 2023-10-12 17:18:59 +02:00
txgenerator_test.go multi: make sure CPFP won't exceed max allowed fee rate 2023-10-06 16:34:47 -07:00
txgenerator.go sweeper: relax anchor sweeping when there's no deadline pressure (#7965) 2023-10-12 17:18:59 +02:00
walletsweep_test.go rpcserver+sweep: fix linter re unused params 2023-10-06 16:34:47 -07:00
walletsweep.go rpcserver+sweep: fix linter re unused params 2023-10-06 16:34:47 -07:00
weight_estimator_test.go multi: make sure CPFP won't exceed max allowed fee rate 2023-10-06 16:34:47 -07:00
weight_estimator.go multi: make sure CPFP won't exceed max allowed fee rate 2023-10-06 16:34:47 -07:00