chainfee: allow specifying min relay feerate from API source

This commit adds a new expected field, `min_relay_feerate`, in the
response body returned from the API source, allowing the API to specify
a min relay feerate to be used instead of the FeePerKwFloor.

This change is backwards compatible as for an old API source which
doesn't specify the `min_relay_feerate`, it will be interpreted as zero.
This commit is contained in:
yyforyongyu committed 2024-07-24 20:05:00 +08:00
1 parent b10ebb2692
commit ce43e4bab7
5 files changed
+124 -32

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ func (s SatPerKVByte) FeePerKWeight() SatPerKWeight {
// String returns a human-readable string of the fee rate.
func (s SatPerKVByte) String() string {
return fmt.Sprintf("%v sat/kb", int64(s))
return fmt.Sprintf("%v sat/kvb", int64(s))
}
// SatPerKWeight represents a fee rate in sat/kw.