ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.81k stars 889 forks source link

pytests: extend the offline mode testcase #7675

Closed m-schmoock closed 3 days ago

m-schmoock commented 3 days ago

Offline mode working properly?

Description

I discovered that a node even and specifically when started --offline mode still tries to acquire a listening socket (and would fail to start if it is already bound!) Also noteworthy, that an --offline node can make outbound connections when done via CLI (or by a plugin like clboss or similar).

What this PR does

Extend the testcase a bit and make it an xfail for the time being.

What needs to be done

I think that an offline node needs to be really offline, because it may harm developers when trying to debug real world data 'in offline mode' and then a connection is made by mistake and a live network channel can end up in an invalid state.

This means that it should not try to bind a listening socket as well as forbid to make manual connections via cli, because a plugin that does not know the node is 'offline' can accidentally make a connection.

m-schmoock commented 3 days ago

That was quick, I thought we would add code that fixes the test and extends a bit (disallowing manual connection attempts)

vincenzopalazzo commented 3 days ago

That was quick, I thought we would add code that fixes the test and extends a bit (disallowing manual connection attempts)

Mh the PR was not ready? How do you want to extend it?

m-schmoock commented 3 days ago

Mh the PR was not ready? How do you want to extend it?

Like this: https://github.com/ElementsProject/lightning/pull/7676 And also fix the actual code, so we don't merge in an xfail.