• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 18011468785

25 Sep 2025 02:50PM UTC coverage: 66.618% (-0.004%) from 66.622%
18011468785

Pull #10067

github

web-flow
Merge e6147e217 into b09b20c69
Pull Request #10067: add sats_per_kweight option when crafting a transaction (continue)

76 of 235 new or added lines in 13 files covered. (32.34%)

31 existing lines in 11 files now uncovered.

136586 of 205029 relevant lines covered (66.62%)

21351.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cmd/commands/walletrpc_types.go
1
package commands
2

3
import "github.com/lightningnetwork/lnd/lnrpc/walletrpc"
4

5
// PendingSweep is a CLI-friendly type of the walletrpc.PendingSweep proto. We
6
// use this to show more useful string versions of byte slices and enums.
7
//
8
// TODO(yy): Remove this struct as it's easy to forget to update the values
9
// here. Instead, we should rely on the struct defined in the proto
10
// `PendingSweepsResponse` only.
11
type PendingSweep struct {
12
        OutPoint             OutPoint `json:"outpoint"`
13
        WitnessType          string   `json:"witness_type"`
14
        AmountSat            uint32   `json:"amount_sat"`
15
        SatPerVByte          uint32   `json:"sat_per_vbyte"`
16
        SatPerKw             uint64   `json:"sat_per_kw"`
17
        BroadcastAttempts    uint32   `json:"broadcast_attempts"`
18
        RequestedSatPerVByte uint32   `json:"requested_sat_per_vbyte"`
19
        RequestedSatPerKw    uint64   `json:"requested_sat_per_kw"`
20
        Immediate            bool     `json:"immediate"`
21
        Budget               uint64   `json:"budget"`
22
        DeadlineHeight       uint32   `json:"deadline_height"`
23
        MaturityHeight       uint32   `json:"maturity_height"`
24

25
        NextBroadcastHeight uint32 `json:"next_broadcast_height"`
26
        RequestedConfTarget uint32 `json:"requested_conf_target"`
27
        Force               bool   `json:"force"`
28
}
29

30
// NewPendingSweepFromProto converts the walletrpc.PendingSweep proto type into
31
// its corresponding CLI-friendly type.
32
func NewPendingSweepFromProto(pendingSweep *walletrpc.PendingSweep) *PendingSweep {
×
33
        return &PendingSweep{
×
34
                OutPoint:             NewOutPointFromProto(pendingSweep.Outpoint),
×
35
                WitnessType:          pendingSweep.WitnessType.String(),
×
36
                AmountSat:            pendingSweep.AmountSat,
×
37
                SatPerVByte:          uint32(pendingSweep.SatPerVbyte),
×
NEW
38
                SatPerKw:             pendingSweep.SatPerKw,
×
39
                BroadcastAttempts:    pendingSweep.BroadcastAttempts,
×
40
                RequestedSatPerVByte: uint32(pendingSweep.RequestedSatPerVbyte),
×
NEW
41
                RequestedSatPerKw:    pendingSweep.RequestedSatPerKw,
×
42
                Immediate:            pendingSweep.Immediate,
×
43
                Budget:               pendingSweep.Budget,
×
44
                DeadlineHeight:       pendingSweep.DeadlineHeight,
×
45
                MaturityHeight:       pendingSweep.MaturityHeight,
×
46

×
47
                // Deprecated fields.
×
48
                NextBroadcastHeight: pendingSweep.NextBroadcastHeight,
×
49
                RequestedConfTarget: pendingSweep.RequestedConfTarget,
×
50
                Force:               pendingSweep.Force,
×
51
        }
×
52
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc