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

Function test_parse_output_desc

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

Source from the content-addressed store, hash-verified

876
877 #[test]
878 fn test_parse_output_desc() {
879 let a = r#"{"address":"1234msat"}"#;
880 let od = serde_json::from_str(a).unwrap();
881
882 assert_eq!(
883 OutputDesc {
884 address: "address".to_string(),
885 amount: Amount { msat: 1234 }
886 },
887 od
888 );
889 let serialized: String = serde_json::to_string(&od).unwrap();
890 assert_eq!(a, serialized);
891 }
892
893 #[test]
894 fn tlvstream() {

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected