mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 06:35:07 +01:00
This commit changes the source that drives the state changes in the sweeper. Previously we used a ticker with default interval of 30s to trigger sweepings periodically. The assumption is, within this 30s we'd batch multiple inputs into one transaction to maximize profits. However, the efficacy of this batch is questionable. At a high level, we can put our inputs into two categories - one that's forced, and one that's not. For forced inputs, we should sweep them immediately as the force flag indicates they are very urgent, eg, CPFPing the force closing tx. For non-forced inputs, such as anchors or HTLCs with CLTV that's far away, we can wait to sweep them till a new block comes in and triggers the sweeping process. Eventually, all inputs will be deadline-aware, and the sweeper will consult our fee bumper about the most economical fee rate to be used for a given deadline. Since the deadlines here are blockstamp, it's also easier to manage them if the sweeper is also using blockstamp instead of timestamp. |
||
---|---|---|
.. | ||
aggregator.go | ||
aggregator_test.go | ||
backend_mock_test.go | ||
bucket_list.go | ||
defaults.go | ||
fee_estimator_mock_test.go | ||
interface.go | ||
log.go | ||
mocks.go | ||
setup_test.go | ||
store.go | ||
store_mock.go | ||
store_test.go | ||
sweeper.go | ||
sweeper_test.go | ||
test_utils.go | ||
tx_input_set.go | ||
tx_input_set_test.go | ||
txgenerator.go | ||
txgenerator_test.go | ||
walletsweep.go | ||
walletsweep_test.go | ||
weight_estimator.go | ||
weight_estimator_test.go |