| 9 | |
| 10 | @plugin.hook('openchannel') |
| 11 | def on_openchannel(openchannel, plugin, **kwargs): |
| 12 | plugin.log(repr(openchannel)) |
| 13 | mindepth = int(plugin.options['zeroconf_mindepth']['value']) |
| 14 | |
| 15 | if openchannel['id'] == plugin.options['zeroconf_allow']['value'] or plugin.options['zeroconf_allow']['value'] == 'any': |
| 16 | plugin.log(f"This peer is in the zeroconf allowlist, setting mindepth={mindepth}") |
| 17 | return {'result': 'continue', 'mindepth': mindepth} |
| 18 | else: |
| 19 | return {'result': 'continue'} |
| 20 | |
| 21 | |
| 22 | plugin.add_option( |