diff --git a/sweep/sweeper.go b/sweep/sweeper.go index 9c8e59c7..1785d70b 100644 --- a/sweep/sweeper.go +++ b/sweep/sweeper.go @@ -80,6 +80,10 @@ type pendingInput struct { // map it into a fee rate whenever we attempt to cluster inputs for a // sweep. feePreference FeePreference + + // lastFeeRate is the most recent fee rate used for this input within a + // transaction broadcast to the network. + lastFeeRate lnwallet.SatPerKWeight } // pendingInputs is a type alias for a set of pending inputs. @@ -580,6 +584,8 @@ func (s *UtxoSweeper) clusterBySweepFeeRate() []inputCluster { inputs = make(pendingInputs) bucketInputs[bucket] = inputs } + + input.lastFeeRate = feeRate inputs[op] = input inputFeeRates[op] = feeRate }