mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +01:00
common: generalize extract_channel_id().
connectd is going to end up using this do demux; make it fast and complete. Fixing this reveals a problem in openingd: it now extracts the channel_id from funding_signed (which is where we transition off the temporary), and gets upset. So fix that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -103,6 +103,9 @@ bool is_peer_error(const tal_t *ctx, const u8 *msg,
|
||||
bool is_wrong_channel(const u8 *msg, const struct channel_id *expected,
|
||||
struct channel_id *actual)
|
||||
{
|
||||
if (!expected)
|
||||
return false;
|
||||
|
||||
if (!extract_channel_id(msg, actual))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user