lnworker/config: check if zeroconf is enabled when forwarding
On LSP side we were only checking if ACCEPT_ZEROCONF_CHANNELS is enabled while forwarding a non-trampoline htlc. During trampoline forwarding the config was ignored. The ACCEPT_* prefix implied this was only for accepting inbound zeroconf channels, but it also controls whether we open them when forwarding HTLCs. Renames the config var to OPEN_ZEROCONF_CHANNELS to clarify it enables zeroconf channel opens in both directions, and add the missing check when forwarding trampoline HTLCs.
This commit is contained in:
+4
-4
@@ -151,12 +151,12 @@ class TestLightningABC(TestLightning):
|
||||
class TestLightningJIT(TestLightning):
|
||||
agents = {
|
||||
'alice': {
|
||||
'accept_zeroconf_channels': 'true',
|
||||
'open_zeroconf_channels': 'true',
|
||||
},
|
||||
'bob': {
|
||||
'lightning_listen': 'localhost:9735',
|
||||
'lightning_forward_payments': 'true',
|
||||
'accept_zeroconf_channels': 'true',
|
||||
'open_zeroconf_channels': 'true',
|
||||
},
|
||||
'carol': {
|
||||
}
|
||||
@@ -170,13 +170,13 @@ class TestLightningJITTrampoline(TestLightningJIT):
|
||||
agents = {
|
||||
'alice': {
|
||||
'use_gossip': 'false',
|
||||
'accept_zeroconf_channels': 'true',
|
||||
'open_zeroconf_channels': 'true',
|
||||
},
|
||||
'bob': {
|
||||
'lightning_listen': 'localhost:9735',
|
||||
'lightning_forward_payments': 'true',
|
||||
'lightning_forward_trampoline_payments': 'true',
|
||||
'accept_zeroconf_channels': 'true',
|
||||
'open_zeroconf_channels': 'true',
|
||||
},
|
||||
'carol': {
|
||||
'use_gossip': 'false',
|
||||
|
||||
Reference in New Issue
Block a user