mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 13:52:55 +02:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user