MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / assert_roundtrip

Function assert_roundtrip

nodedb-cluster/src/swim/wire/codec.rs:55–59  ·  view source on GitHub ↗
(msg: SwimMessage)

Source from the content-addressed store, hash-verified

53 }
54
55 fn assert_roundtrip(msg: SwimMessage) {
56 let bytes = encode(&msg).expect("encode");
57 let decoded = decode(&bytes).expect("decode");
58 assert_eq!(decoded, msg);
59 }
60
61 #[test]
62 fn ping_roundtrip_empty_piggyback() {

Callers 5

ping_req_roundtripFunction · 0.85
ack_roundtripFunction · 0.85

Calls 3

encodeFunction · 0.70
decodeFunction · 0.70
expectMethod · 0.45

Tested by 5

ping_req_roundtripFunction · 0.68
ack_roundtripFunction · 0.68