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:
Rusty Russell
2021-06-15 06:39:51 +09:30
parent ef138575e1
commit b223a6acbb
5 changed files with 28 additions and 23 deletions

View File

@@ -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: