walletrpc: add sat_per_kw fee rate option

To allow more precise fee rates, we add a sat_per_kw option to the fee
oneof in the gRPC definition.
This commit is contained in:
Oliver Gugger committed 2024-11-04 14:12:26 +01:00
1 parent 22ae3e5ddd
commit fb8bdfefd3
4 files changed
+37 -3

No files matched your search

+5 -1
View File
@@ -1511,9 +1511,13 @@ func (w *WalletKit) FundPsbt(_ context.Context,
req.GetSatPerVbyte() * 1000,
).FeePerKWeight()
case req.GetSatPerKw() != 0:
feeSatPerKW = chainfee.SatPerKWeight(req.GetSatPerKw())
default:
return nil, fmt.Errorf("fee definition missing, need to " +
"specify either target_conf or sat_per_vbyte")
"specify either target_conf, sat_per_vbyte or " +
"sat_per_kw")
}
// Then, we'll extract the minimum number of confirmations that each