mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
common/read_peer_msg: don't try to handle reestablish/reopen.
Let the callers do that (only channeld needs to do this). We temporarily send an error on unknown reestablish in openingd, as this mimic previous behavior and avoids breaking tests (it does leave a BROKEN message in the logs though, so test_funding_external_wallet_corners needs to ignore that for now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -162,7 +162,6 @@ bool handle_peer_gossip_or_error(struct per_peer_state *pps,
|
||||
{
|
||||
char *err;
|
||||
bool warning;
|
||||
struct channel_id actual;
|
||||
|
||||
#if DEVELOPER
|
||||
/* Any odd-typed unknown message is handled by the caller, so if we
|
||||
@@ -200,18 +199,6 @@ bool handle_peer_gossip_or_error(struct per_peer_state *pps,
|
||||
goto handled;
|
||||
}
|
||||
|
||||
/* They're talking about a different channel? */
|
||||
if (is_wrong_channel(msg, channel_id, &actual)) {
|
||||
status_debug("Rejecting %s for unknown channel_id %s",
|
||||
peer_wire_name(fromwire_peektype(msg)),
|
||||
type_to_string(tmpctx, struct channel_id, &actual));
|
||||
sync_crypto_write(pps,
|
||||
take(towire_errorfmt(NULL, &actual,
|
||||
"Multiple channels"
|
||||
" unsupported")));
|
||||
goto handled;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
handled:
|
||||
|
||||
Reference in New Issue
Block a user