diff --git a/daemon/p2p_announce.c b/daemon/p2p_announce.c index a3daedb03..5e7a64ed2 100644 --- a/daemon/p2p_announce.c +++ b/daemon/p2p_announce.c @@ -149,8 +149,7 @@ void handle_channel_announcement( const tal_t *tmpctx = tal_tmpctx(peer); serialized = tal_dup_arr(tmpctx, u8, announce, len, 0); - /* FIXME: use NULL arg to mean tal_count() here! */ - if (!fromwire_channel_announcement(serialized, &len, + if (!fromwire_channel_announcement(serialized, NULL, &node_signature_1, &node_signature_2, &channel_id, &bitcoin_signature_1, @@ -207,8 +206,7 @@ void handle_channel_update(struct peer *peer, const u8 *update, size_t len) const tal_t *tmpctx = tal_tmpctx(peer); serialized = tal_dup_arr(tmpctx, u8, update, len, 0); - /* FIXME: use NULL arg to mean tal_count() here! */ - if (!fromwire_channel_update(serialized, &len, &signature, &channel_id, + if (!fromwire_channel_update(serialized, NULL, &signature, &channel_id, ×tamp, &flags, &expiry, &htlc_minimum_msat, &fee_base_msat, &fee_proportional_millionths)) { @@ -283,8 +281,7 @@ void handle_node_announcement( const tal_t *tmpctx = tal_tmpctx(peer); serialized = tal_dup_arr(tmpctx, u8, node_ann, len, 0); - /* FIXME: use NULL arg to mean tal_count() here! */ - if (!fromwire_node_announcement(serialized, &len, + if (!fromwire_node_announcement(serialized, NULL, &signature, ×tamp, &ipv6, &port, &node_id, rgb_color, alias)) { tal_free(tmpctx); diff --git a/tools/generate-wire.py b/tools/generate-wire.py index 87152f866..8b7d075dc 100755 --- a/tools/generate-wire.py +++ b/tools/generate-wire.py @@ -169,7 +169,12 @@ class Message(object): print('\t{} {};'.format(f.typename, f.name)); print('\tconst u8 *cursor = p;\n' + '\tsize_t tmp_len;\n' '\n' + '\tif (!plen) {{\n' + '\t\ttmp_len = tal_count(p);\n' + '\t\tplen = &tmp_len;\n' + '\t}}\n' '\tif (fromwire_u16(&cursor, plen) != {})\n' '\t\treturn false;' .format(self.enum.name))