tests: remove EXPERIMENTAL_FEATURE flag from openchannel2 hooks

These are now included in all builds
This commit is contained in:
niftynei
2021-04-20 15:44:45 -05:00
committed by Rusty Russell
parent 15e83925e8
commit 0e753224ae
4 changed files with 20 additions and 40 deletions

View File

@@ -6,10 +6,6 @@ Useful fot testing chained hook.
"""
from pyln.client import Plugin
from pyln.testing.utils import env
EXPERIMENTAL_FEATURES = env("EXPERIMENTAL_FEATURES", "0") == "1"
plugin = Plugin()
@@ -21,12 +17,11 @@ def on_openchannel(openchannel, plugin, **kwargs):
return {'result': 'reject', 'error_message': msg}
if EXPERIMENTAL_FEATURES:
@plugin.hook('openchannel2')
def on_openchannel2(openchannel2, plugin, **kwargs):
msg = "reject on principle"
plugin.log(msg)
return {'result': 'reject', 'error_message': msg}
@plugin.hook('openchannel2')
def on_openchannel2(openchannel2, plugin, **kwargs):
msg = "reject on principle"
plugin.log(msg)
return {'result': 'reject', 'error_message': msg}
plugin.run()