mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-08 23:01:53 +02:00
Merge pull request #8838 from yyforyongyu/update-pendingsweeps
cli: update `pendingsweeps` response
This commit is contained in:
@@ -5,16 +5,19 @@ import "github.com/lightningnetwork/lnd/lnrpc/walletrpc"
|
|||||||
// PendingSweep is a CLI-friendly type of the walletrpc.PendingSweep proto. We
|
// PendingSweep is a CLI-friendly type of the walletrpc.PendingSweep proto. We
|
||||||
// use this to show more useful string versions of byte slices and enums.
|
// use this to show more useful string versions of byte slices and enums.
|
||||||
type PendingSweep struct {
|
type PendingSweep struct {
|
||||||
OutPoint OutPoint `json:"outpoint"`
|
OutPoint OutPoint `json:"outpoint"`
|
||||||
WitnessType string `json:"witness_type"`
|
WitnessType string `json:"witness_type"`
|
||||||
AmountSat uint32 `json:"amount_sat"`
|
AmountSat uint32 `json:"amount_sat"`
|
||||||
SatPerVByte uint32 `json:"sat_per_vbyte"`
|
SatPerVByte uint32 `json:"sat_per_vbyte"`
|
||||||
BroadcastAttempts uint32 `json:"broadcast_attempts"`
|
BroadcastAttempts uint32 `json:"broadcast_attempts"`
|
||||||
// TODO(yy): deprecate.
|
RequestedSatPerVByte uint32 `json:"requested_sat_per_vbyte"`
|
||||||
NextBroadcastHeight uint32 `json:"next_broadcast_height"`
|
Immediate bool `json:"immediate"`
|
||||||
RequestedSatPerVByte uint32 `json:"requested_sat_per_vbyte"`
|
Budget uint64 `json:"budget"`
|
||||||
RequestedConfTarget uint32 `json:"requested_conf_target"`
|
DeadlineHeight uint32 `json:"deadline_height"`
|
||||||
Force bool `json:"force"`
|
|
||||||
|
NextBroadcastHeight uint32 `json:"next_broadcast_height"`
|
||||||
|
RequestedConfTarget uint32 `json:"requested_conf_target"`
|
||||||
|
Force bool `json:"force"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPendingSweepFromProto converts the walletrpc.PendingSweep proto type into
|
// NewPendingSweepFromProto converts the walletrpc.PendingSweep proto type into
|
||||||
@@ -26,9 +29,14 @@ func NewPendingSweepFromProto(pendingSweep *walletrpc.PendingSweep) *PendingSwee
|
|||||||
AmountSat: pendingSweep.AmountSat,
|
AmountSat: pendingSweep.AmountSat,
|
||||||
SatPerVByte: uint32(pendingSweep.SatPerVbyte),
|
SatPerVByte: uint32(pendingSweep.SatPerVbyte),
|
||||||
BroadcastAttempts: pendingSweep.BroadcastAttempts,
|
BroadcastAttempts: pendingSweep.BroadcastAttempts,
|
||||||
NextBroadcastHeight: pendingSweep.NextBroadcastHeight,
|
|
||||||
RequestedSatPerVByte: uint32(pendingSweep.RequestedSatPerVbyte),
|
RequestedSatPerVByte: uint32(pendingSweep.RequestedSatPerVbyte),
|
||||||
RequestedConfTarget: pendingSweep.RequestedConfTarget,
|
Immediate: pendingSweep.Immediate,
|
||||||
Force: pendingSweep.Force,
|
Budget: pendingSweep.Budget,
|
||||||
|
DeadlineHeight: pendingSweep.DeadlineHeight,
|
||||||
|
|
||||||
|
// Deprecated fields.
|
||||||
|
NextBroadcastHeight: pendingSweep.NextBroadcastHeight,
|
||||||
|
RequestedConfTarget: pendingSweep.RequestedConfTarget,
|
||||||
|
Force: pendingSweep.Force,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user