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

Function tlvstream

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

Source from the content-addressed store, hash-verified

892
893 #[test]
894 fn tlvstream() {
895 let stream = TlvStream {
896 entries: vec![
897 TlvEntry {
898 typ: 31337,
899 value: vec![1, 2, 3, 4, 5],
900 },
901 TlvEntry {
902 typ: 42,
903 value: vec![],
904 },
905 ],
906 };
907
908 let res = serde_json::to_string(&stream).unwrap();
909 assert_eq!(res, "{\"31337\":\"0102030405\",\"42\":\"\"}");
910 }
911
912 #[test]
913 fn test_fundchannel() {

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected