mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: neaten test_cln_sendpay_weirdness, rename.
1. Allow 'any' as an option to zeroconf-selective.py plugin so we can use it in line_graph where we don't know ids yet. 2. Use modern helpers like line_graph and remove debugging statement. 3. Don't use listchannels(): it's true that it shows local channels as well, but that's a quirk I'd like to remove. 4. Make flake8 happy. 5. Rename to be more specific now it's a more narrow test. I manually tested that the test still failed with the fixes removed, too, so it is still the same test! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -12,7 +12,7 @@ def on_openchannel(openchannel, plugin, **kwargs):
|
||||
plugin.log(repr(openchannel))
|
||||
mindepth = int(plugin.options['zeroconf-mindepth']['value'])
|
||||
|
||||
if openchannel['id'] == plugin.options['zeroconf-allow']['value']:
|
||||
if openchannel['id'] == plugin.options['zeroconf-allow']['value'] or plugin.options['zeroconf-allow']['value'] == 'any':
|
||||
plugin.log(f"This peer is in the zeroconf allowlist, setting mindepth={mindepth}")
|
||||
return {'result': 'continue', 'mindepth': mindepth}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user