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

Function on_openchannel2

tests/plugins/openchannel_hook_delay.py:23–28  ·  view source on GitHub ↗
(openchannel2, plugin, **kwargs)

Source from the content-addressed store, hash-verified

21
22@plugin.hook('openchannel2')
23def on_openchannel2(openchannel2, plugin, **kwargs):
24 delaytime = float(plugin.get_option('delaytime'))
25 msg = f'delaying WIRE_ACCEPT_CHANNEL for {delaytime}s'
26 plugin.log(msg)
27 time.sleep(delaytime)
28 return {'result': 'continue'}
29
30
31plugin.add_option('delaytime', '10', 'How long to hold the WIRE_OPEN_CHANNEL.')

Callers

nothing calls this directly

Calls 2

get_optionMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected