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

Function on_openchannel

tests/plugins/zeroconf-selective.py:11–19  ·  view source on GitHub ↗
(openchannel, plugin, **kwargs)

Source from the content-addressed store, hash-verified

9
10@plugin.hook('openchannel')
11def on_openchannel(openchannel, plugin, **kwargs):
12 plugin.log(repr(openchannel))
13 mindepth = int(plugin.options['zeroconf_mindepth']['value'])
14
15 if openchannel['id'] == plugin.options['zeroconf_allow']['value'] or plugin.options['zeroconf_allow']['value'] == 'any':
16 plugin.log(f"This peer is in the zeroconf allowlist, setting mindepth={mindepth}")
17 return {'result': 'continue', 'mindepth': mindepth}
18 else:
19 return {'result': 'continue'}
20
21
22plugin.add_option(

Callers

nothing calls this directly

Calls 1

logMethod · 0.80

Tested by

no test coverage detected