2020-01-29 22:33:10 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
|
|
from pyln.client import Plugin
|
|
|
|
|
|
|
|
|
|
# Register a different set feature of feature bits for each location so we can
|
|
|
|
|
# later check that they are being passed correctly.
|
|
|
|
|
plugin = Plugin(
|
2020-02-03 13:04:16 +01:00
|
|
|
dynamic=False,
|
2020-05-20 06:11:24 +09:30
|
|
|
init_features=1 << 201,
|
|
|
|
|
node_features=1 << 203,
|
|
|
|
|
invoice_features=1 << 205,
|
2020-01-29 22:33:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2025-10-09 14:11:31 +02:00
|
|
|
@plugin.init()
|
|
|
|
|
def init(configuration, options, plugin):
|
2025-10-10 17:01:14 +02:00
|
|
|
if options.get('disable-on-init'):
|
2025-10-09 14:11:31 +02:00
|
|
|
return {'disable': 'init saying disable'}
|
|
|
|
|
return {}
|
|
|
|
|
|
|
|
|
|
|
2025-10-10 17:01:14 +02:00
|
|
|
plugin.add_option('disable-on-init', False, 'disable plugin on init', opt_type='bool')
|
2020-01-29 22:33:10 +01:00
|
|
|
plugin.run()
|