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

Function on_config_change

tests/plugins/dynamic_multi_option.py:15–23  ·  view source on GitHub ↗

Callback when config value changes.

(plugin, config: str, value: Optional[Any])

Source from the content-addressed store, hash-verified

13
14
15def on_config_change(plugin, config: str, value: Optional[Any]) -> None:
16 """Callback when config value changes."""
17 plugin.log(f"Setting config {config} to {value} (type: {type(value).__name__})")
18 if isinstance(value, list):
19 for v in value:
20 if v == 'reject-me':
21 raise RpcException("I don't like reject-me!")
22 elif value == 'reject-me':
23 raise RpcException("I don't like reject-me!")
24
25
26plugin.add_option(

Callers

nothing calls this directly

Calls 2

RpcExceptionClass · 0.90
logMethod · 0.80

Tested by

no test coverage detected