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

Function test_encode_frame

plugins/lsps-plugin/src/proto/lsps0.rs:225–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223
224 #[test]
225 fn test_encode_frame() {
226 let json = TEST_JSON.as_bytes();
227 let wire_bytes = encode_frame(json);
228
229 assert_eq!(wire_bytes.len(), 2 + json.len());
230 assert_eq!(wire_bytes[0], 0x94);
231 assert_eq!(wire_bytes[1], 0x19);
232 assert_eq!(&wire_bytes[2..], json);
233 }
234
235 #[test]
236 fn test_encode_decode_frame_roundtrip() {

Callers

nothing calls this directly

Calls 1

encode_frameFunction · 0.85

Tested by

no test coverage detected