MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_parse_feerate

Function test_parse_feerate

cln-rpc/src/primitives.rs:860–875  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

858
859 #[test]
860 fn test_parse_feerate() {
861 let tests = vec![
862 ("slow", Feerate::Slow),
863 ("normal", Feerate::Normal),
864 ("urgent", Feerate::Urgent),
865 ("12345perkb", Feerate::PerKb(12345)),
866 ("54321perkw", Feerate::PerKw(54321)),
867 ];
868
869 for (input, output) in tests.into_iter() {
870 let parsed: Feerate = input.try_into().unwrap();
871 assert_eq!(parsed, output);
872 let serialized: String = (&parsed).into();
873 assert_eq!(serialized, input);
874 }
875 }
876
877 #[test]
878 fn test_parse_output_desc() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected