sweep: add new interface Cluster to manage grouping inputs

This commit adds a new interface `Cluster` to manage cluster-level
inputs grouping. This new interface replaces the `inputCluster` and will
be futher refactored so the sweeper can use a much smaller coin
selection lock.
This commit is contained in:
yyforyongyu committed 2024-04-19 21:33:25 +08:00
1 parent a7e9c08baf
commit 9d5ddf29f3
6 files changed
+171 -353

No files matched your search

+1 -1
View File
@@ -331,7 +331,7 @@ func (t *txInputSet) add(input input.Input, constraints addConstraints) bool {
// up the utxo set even if it costs us some fees up front. In the spirit of
// minimizing any negative externalities we cause for the Bitcoin system as a
// whole.
func (t *txInputSet) addPositiveYieldInputs(sweepableInputs []txInput) {
func (t *txInputSet) addPositiveYieldInputs(sweepableInputs []*pendingInput) {
for i, inp := range sweepableInputs {
// Apply relaxed constraints for force sweeps.
constraints := constraintsRegular