mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
tests: remove EXPERIMENTAL_FEATURE flag from openchannel2 hooks
These are now included in all builds
This commit is contained in:
@@ -5,14 +5,10 @@ Will simply accept any channel. Useful fot testing chained hook.
|
||||
"""
|
||||
|
||||
from pyln.client import Plugin
|
||||
from pyln.testing.utils import env
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
EXPERIMENTAL_FEATURES = env("EXPERIMENTAL_FEATURES", "0") == "1"
|
||||
|
||||
|
||||
@plugin.hook('openchannel')
|
||||
def on_openchannel(openchannel, plugin, **kwargs):
|
||||
msg = "accept on principle"
|
||||
@@ -20,12 +16,11 @@ def on_openchannel(openchannel, plugin, **kwargs):
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
if EXPERIMENTAL_FEATURES:
|
||||
@plugin.hook('openchannel2')
|
||||
def on_openchannel2(openchannel2, plugin, **kwargs):
|
||||
msg = "accept on principle"
|
||||
plugin.log(msg)
|
||||
return {'result': 'continue'}
|
||||
@plugin.hook('openchannel2')
|
||||
def on_openchannel2(openchannel2, plugin, **kwargs):
|
||||
msg = "accept on principle"
|
||||
plugin.log(msg)
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
|
||||
Reference in New Issue
Block a user