mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
generate-wire.py: don't generate structures, hand in all values.
This is a bit more awkward for large structures, but avoids indirection for the simpler ones (I copied the structures for the test code, however). We also remove explicit padding. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1866,16 +1866,13 @@ static bool nested_pkt_in(struct peer *peer, const u32 type,
|
||||
{
|
||||
switch (type) {
|
||||
case WIRE_CHANNEL_ANNOUNCEMENT:
|
||||
handle_channel_announcement(
|
||||
peer, fromwire_channel_announcement(peer, innerpkt, &innerpktlen));
|
||||
handle_channel_announcement(peer, innerpkt, innerpktlen);
|
||||
break;
|
||||
case WIRE_CHANNEL_UPDATE:
|
||||
handle_channel_update(
|
||||
peer, fromwire_channel_update(peer, innerpkt, &innerpktlen));
|
||||
handle_channel_update(peer, innerpkt, innerpktlen);
|
||||
break;
|
||||
case WIRE_NODE_ANNOUNCEMENT:
|
||||
handle_node_announcement(
|
||||
peer, fromwire_node_announcement(peer, innerpkt, &innerpktlen));
|
||||
handle_node_announcement(peer, innerpkt, innerpktlen);
|
||||
break;
|
||||
default:
|
||||
/* BOLT01: Unknown even typed packets MUST kill the
|
||||
|
||||
Reference in New Issue
Block a user