mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
lightningd: add more information should subd send wrong message.
I saw this once, but could not track it down. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -836,7 +836,8 @@ void subd_send_msg(struct subd *sd, const u8 *msg_out)
|
||||
u16 type = fromwire_peektype(msg_out);
|
||||
/* FIXME: We should use unique upper bits for each daemon, then
|
||||
* have generate-wire.py add them, just assert here. */
|
||||
assert(!strstarts(sd->msgname(type), "INVALID"));
|
||||
if (strstarts(sd->msgname(type), "INVALID"))
|
||||
fatal("Sending %s an invalid message %s", sd->name, tal_hex(tmpctx, msg_out));
|
||||
msg_enqueue(sd->outq, msg_out);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user