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

Function on_custommsg

tests/plugins/custommsg_notification.py:12–18  ·  view source on GitHub ↗
(custommsg, **_)

Source from the content-addressed store, hash-verified

10
11@plugin.subscribe("custommsg")
12def on_custommsg(custommsg, **_):
13 plugin.log(f"Received a custommsg with data msg={custommsg}")
14
15 peer_id = custommsg["peer_id"]
16 payload = custommsg["payload"]
17 plugin.log(f"peer_id={peer_id}")
18 plugin.log(f"payload={payload}")
19
20
21plugin.run()

Callers

nothing calls this directly

Calls 1

logMethod · 0.80

Tested by

no test coverage detected