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:
Rusty Russell
2017-01-04 14:09:20 +10:30
parent 326a9c9477
commit c864b28068
8 changed files with 944 additions and 229 deletions

View File

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