sweep: add lastFeeRate field to PendingInput
This will serve useful when exposing the pending inputs over RPC, since we currently don't keep track of the last fee rate used for an input.
This commit is contained in:
parent
880279b266
commit
50a8f188a3
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user