Skip to content

Commit

Permalink
Merge pull request #8992 from guggero/estimate-fee-cli
Browse files Browse the repository at this point in the history
cmd/lncli: add min relay fee to `lncli wallet estimatefeerate`
  • Loading branch information
guggero authored Aug 8, 2024
2 parents 5a84ca8 + eac5460 commit bbd313d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cmd/lncli/walletrpc_active.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,20 @@ func estimateFeeRate(ctx *cli.Context) error {

rateKW := chainfee.SatPerKWeight(resp.SatPerKw)
rateVB := rateKW.FeePerVByte()
relayFeeKW := chainfee.SatPerKWeight(resp.MinRelayFeeSatPerKw)
relayFeeVB := relayFeeKW.FeePerVByte()

printJSON(struct {
SatPerKw int64 `json:"sat_per_kw"`
SatPerVByte int64 `json:"sat_per_vbyte"`
SatPerKw int64 `json:"sat_per_kw"`
SatPerVByte int64 `json:"sat_per_vbyte"`
MinRelayFeeSatPerKw int64 `json:"min_relay_fee_sat_per_kw"`
//nolint:lll
MinRelayFeeSatPerVByte int64 `json:"min_relay_fee_sat_per_vbyte"`
}{
SatPerKw: int64(rateKW),
SatPerVByte: int64(rateVB),
SatPerKw: int64(rateKW),
SatPerVByte: int64(rateVB),
MinRelayFeeSatPerKw: int64(relayFeeKW),
MinRelayFeeSatPerVByte: int64(relayFeeVB),
})

return nil
Expand Down

0 comments on commit bbd313d

Please sign in to comment.