commands: add new field MaturityHeight

This commit is contained in:
yyforyongyu
2025-04-17 06:13:54 +08:00
parent 94463c6844
commit d991f5659a

View File

@@ -4,6 +4,10 @@ import "github.com/lightningnetwork/lnd/lnrpc/walletrpc"
// 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.
//
// TODO(yy): Remove this struct as it's easy to forget to update the values
// here. Instead, we should rely on the struct defined in the proto
// `PendingSweepsResponse` only.
type PendingSweep struct {
OutPoint OutPoint `json:"outpoint"`
WitnessType string `json:"witness_type"`
@@ -14,6 +18,7 @@ type PendingSweep struct {
Immediate bool `json:"immediate"`
Budget uint64 `json:"budget"`
DeadlineHeight uint32 `json:"deadline_height"`
MaturityHeight uint32 `json:"maturity_height"`
NextBroadcastHeight uint32 `json:"next_broadcast_height"`
RequestedConfTarget uint32 `json:"requested_conf_target"`
@@ -33,6 +38,7 @@ func NewPendingSweepFromProto(pendingSweep *walletrpc.PendingSweep) *PendingSwee
Immediate: pendingSweep.Immediate,
Budget: pendingSweep.Budget,
DeadlineHeight: pendingSweep.DeadlineHeight,
MaturityHeight: pendingSweep.MaturityHeight,
// Deprecated fields.
NextBroadcastHeight: pendingSweep.NextBroadcastHeight,