()
| 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() { |