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

Function on_openchannel

tests/plugins/openchannel_hook_delay.py:14–19  ·  view source on GitHub ↗
(openchannel, plugin, **kwargs)

Source from the content-addressed store, hash-verified

12
13@plugin.hook('openchannel')
14def on_openchannel(openchannel, plugin, **kwargs):
15 delaytime = float(plugin.get_option('delaytime'))
16 msg = f'delaying WIRE_ACCEPT_CHANNEL for {delaytime}s'
17 plugin.log(msg)
18 time.sleep(delaytime)
19 return {'result': 'continue'}
20
21
22@plugin.hook('openchannel2')

Callers

nothing calls this directly

Calls 2

get_optionMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected