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

Function test_custommsg_hook

cln-rpc/src/test.rs:798–810  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

796
797#[test]
798fn test_custommsg_hook() {
799 let r = serde_json::json!({
800 "peer_id": "02df5ffe895c778e10f7742a6c5b8a0cefbe9465df58b92fadeb883752c8107c8f",
801 "payload": "1337ffffffff"
802 });
803 let d: CustommsgHookEvent = serde_json::from_value(r).unwrap();
804 assert_eq!(
805 d.peer_id.to_string(),
806 "02df5ffe895c778e10f7742a6c5b8a0cefbe9465df58b92fadeb883752c8107c8f"
807 );
808 assert_eq!(d.payload, "1337ffffffff");
809 assert_serde_roundtrip!(d, CustommsgHookEvent);
810}
811
812#[test]
813fn test_onionmessage_recv() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected