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

Function serialize_custom_msg_notification

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

Source from the content-addressed store, hash-verified

243
244#[test]
245fn serialize_custom_msg_notification() {
246 let msg = CustomMsgNotification {
247 peer_id: PublicKey::from_str(
248 "0364aeb75519be29d1af7b8cc6232dbda9fdabb79b66e4e1f6a223750954db210b",
249 )
250 .unwrap(),
251 payload: String::from("941746573749"),
252 };
253
254 let notification = Notification::CustomMsg(msg);
255
256 assert_eq!(
257 serde_json::to_value(notification).unwrap(),
258 serde_json::json!(
259 {
260 "custommsg" : {
261 "peer_id" : "0364aeb75519be29d1af7b8cc6232dbda9fdabb79b66e4e1f6a223750954db210b",
262 "payload" : "941746573749"
263 }
264 }
265 )
266 );
267}
268
269#[test]
270fn serialize_block_added_notification() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected