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

Function on_config_change

tests/plugins/dynamic_option.py:13–18  ·  view source on GitHub ↗

Callback method called when a config value is changed.

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

Source from the content-addressed store, hash-verified

11
12
13def on_config_change(plugin, config: str, value: Optional[Any]) -> None:
14 """Callback method called when a config value is changed.
15 """
16 plugin.log(f"Setting config {config} to {value}")
17 if value == 'bad value':
18 raise RpcException("I don't like bad values!")
19
20
21plugin.add_option(

Callers

nothing calls this directly

Calls 2

RpcExceptionClass · 0.90
logMethod · 0.80

Tested by

no test coverage detected