mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +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:
@@ -88,10 +88,10 @@ void towire_channel_id(u8 **pptr, const struct channel_id *channel_id)
|
||||
towire(pptr, channel_id, sizeof(*channel_id));
|
||||
}
|
||||
|
||||
void fromwire_channel_id(const u8 **cursor, size_t *max,
|
||||
bool fromwire_channel_id(const u8 **cursor, size_t *max,
|
||||
struct channel_id *channel_id)
|
||||
{
|
||||
fromwire(cursor, max, channel_id, sizeof(*channel_id));
|
||||
return fromwire(cursor, max, channel_id, sizeof(*channel_id)) != NULL;
|
||||
}
|
||||
|
||||
REGISTER_TYPE_TO_HEXSTR(channel_id);
|
||||
|
||||
Reference in New Issue
Block a user