sweep+walletrpc+lncli: report requested fee preference for pending sweeps
Previously only the fee rate used for the last sweep (the sweep bucket average) was reported. This commit adds the request fee preference to the report, which is used to select a bucket and the sweep tx fee rate.
This commit is contained in:
5 files changed
+101
-62
No files matched your search
@@ -404,6 +404,9 @@ func (w *WalletKit) PendingSweeps(ctx context.Context,
|
||||
broadcastAttempts := uint32(pendingInput.BroadcastAttempts)
|
||||
nextBroadcastHeight := uint32(pendingInput.NextBroadcastHeight)
|
||||
|
||||
requestedFee := pendingInput.Params.Fee
|
||||
requestedFeeRate := uint32(requestedFee.FeeRate.FeePerKVByte() / 1000)
|
||||
|
||||
rpcPendingSweeps = append(rpcPendingSweeps, &PendingSweep{
|
||||
Outpoint: op,
|
||||
WitnessType: witnessType,
|
||||
@@ -411,6 +414,8 @@ func (w *WalletKit) PendingSweeps(ctx context.Context,
|
||||
SatPerByte: satPerByte,
|
||||
BroadcastAttempts: broadcastAttempts,
|
||||
NextBroadcastHeight: nextBroadcastHeight,
|
||||
RequestedSatPerByte: requestedFeeRate,
|
||||
RequestedConfTarget: requestedFee.ConfTarget,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user