From: Conor Okus Date: Wed, 8 Dec 2021 17:15:57 +0000 (+0000) Subject: Updates Fee estimator docs to include a max return value for get_est_sat_per_1000_weight X-Git-Tag: v0.0.104~6^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=0c34737e3512e7e254a93ce6fa44d35843a594d5;p=rust-lightning Updates Fee estimator docs to include a max return value for get_est_sat_per_1000_weight Updates docs to include a max return value for get_est_sat_per_1000_weight Adds max to both conversions Additional detail --- diff --git a/lightning/src/chain/chaininterface.rs b/lightning/src/chain/chaininterface.rs index 8ccfb9455..cca51e318 100644 --- a/lightning/src/chain/chaininterface.rs +++ b/lightning/src/chain/chaininterface.rs @@ -41,12 +41,12 @@ pub enum ConfirmationTarget { pub trait FeeEstimator { /// Gets estimated satoshis of fee required per 1000 Weight-Units. /// - /// Must be no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later round-downs - /// don't put us below 1 satoshi-per-byte). + /// Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later + /// round-downs don't put us below 1 satoshi-per-byte). /// - /// This translates to: - /// * satoshis-per-byte * 250 - /// * ceil(satoshis-per-kbyte / 4) + /// This method can be implemented with the following unit conversions: + /// * max(satoshis-per-byte * 250, 253) + /// * max(satoshis-per-kbyte / 4, 253) fn get_est_sat_per_1000_weight(&self, confirmation_target: ConfirmationTarget) -> u32; }