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

Function echo

tests/plugins/millisatoshis.py:9–20  ·  view source on GitHub ↗
(plugin, msat: Millisatoshi, not_an_msat)

Source from the content-addressed store, hash-verified

7
8@plugin.method("echo")
9def echo(plugin, msat: Millisatoshi, not_an_msat):
10 plugin.log("got echo for {} {} (types {} and {})"
11 .format(msat, not_an_msat, type(msat), type(not_an_msat)))
12 if not isinstance(msat, Millisatoshi):
13 raise TypeError("msat must be Millisatoshi not {}".format(type(msat)))
14 if isinstance(not_an_msat, Millisatoshi):
15 raise TypeError("not_an_msat must not be Millisatoshi")
16 plugin.log("got echo for {} (type {})".format(msat, type(msat)))
17 if not isinstance(msat, Millisatoshi):
18 raise TypeError("msat must be Millisatoshi not {}".format(type(msat)))
19 plugin.log("Returning {}".format(msat))
20 return {'echo_msat': msat}
21
22
23plugin.run()

Callers

nothing calls this directly

Calls 1

logMethod · 0.80

Tested by

no test coverage detected