From d991f5659a950a64af2b95448354f690a5cd49b8 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 17 Apr 2025 06:13:54 +0800 Subject: [PATCH] commands: add new field `MaturityHeight` --- cmd/commands/walletrpc_types.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/commands/walletrpc_types.go b/cmd/commands/walletrpc_types.go index 4369151fa..790114c77 100644 --- a/cmd/commands/walletrpc_types.go +++ b/cmd/commands/walletrpc_types.go @@ -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,