We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eea11c3 commit 2bb341bCopy full SHA for 2bb341b
1 file changed
types/src/lib.rs
@@ -288,3 +288,16 @@ impl ScriptSig {
288
ScriptBuf::from_hex(&self.hex)
289
}
290
291
+
292
+#[cfg(test)]
293
+mod tests {
294
+ use super::*;
295
296
+ #[test]
297
+ fn convert_btc_per_kb() {
298
+ // per kB = per kvB because this is a conversion of legacy transaction weights.
299
+ let f: f64 = 0.000001;
300
+ let got = btc_per_kb(f).unwrap();
301
+ assert_eq!(got, Some(FeeRate::from_sat_per_kwu(25)))
302
+ }
303
+}
0 commit comments