channeld: treat all incoming errors as "soft", so we retry.

We still close the channel if we *send* an error, but we seem to have hit
another case where LND sends an error which seems transient, so this will
make a best-effort attempt to preserve our channel in that case.

Some test have to be modified, since they don't terminate as they did
previously :(

Changelog-Changed: quirks: We'll now reconnect and retry if we get an error on an established channel. This works around lnd sending error messages that may be non-fatal.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-12-13 20:46:14 +10:30
committed by Christian Decker
parent 839909d2cf
commit 1d0c433dc4
10 changed files with 41 additions and 30 deletions

View File

@@ -58,6 +58,7 @@ bool is_wrong_channel(const u8 *msg, const struct channel_id *expected,
* handle_peer_gossip_or_error - simple handler for all the above cases.
* @pps: per-peer state.
* @channel_id: the channel id of the current channel.
* @soft_error: tell lightningd that incoming error is non-fatal.
* @msg: the peer message (only taken if returns true).
*
* This returns true if it handled the packet: a gossip packet (forwarded
@@ -66,6 +67,7 @@ bool is_wrong_channel(const u8 *msg, const struct channel_id *expected,
*/
bool handle_peer_gossip_or_error(struct per_peer_state *pps,
const struct channel_id *channel_id,
bool soft_error,
const u8 *msg TAKES);
/**