sweep: deepen the interface Aggregator

This commit makes the `ClusterInputs` directly returning the `InputSet`
so the sweeper doesn't know about the existence of `Cluster` interface.
This way we can have a deeper interface as the sweeper only needs to
interact with `Aggregator` only to get the final input sets, leaving the
implementation details being managed by `SimpleAggregator` and future
aggregators.
This commit is contained in:
yyforyongyu
2023-10-30 21:32:46 +08:00
parent 1530fee9b3
commit b536e9bd3f
6 changed files with 69 additions and 71 deletions

View File

@@ -1065,6 +1065,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
aggregator := sweep.NewSimpleUtxoAggregator(
cc.FeeEstimator, cfg.Sweeper.MaxFeeRate.FeePerKWeight(),
sweep.DefaultMaxInputsPerTx,
)
s.sweeper = sweep.New(&sweep.UtxoSweeperConfig{