gossipd: use tal_dup_talarr helper.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-01-22 15:19:33 +10:30
parent f6191c8ef9
commit 02aa39a9d7

View File

@ -1450,11 +1450,10 @@ u8 *handle_channel_update(struct routing_state *rstate, const u8 *update TAKES,
u32 fee_proportional_millionths; u32 fee_proportional_millionths;
struct bitcoin_blkid chain_hash; struct bitcoin_blkid chain_hash;
u8 direction; u8 direction;
size_t len = tal_count(update);
struct pending_cannouncement *pending; struct pending_cannouncement *pending;
u8 *err; u8 *err;
serialized = tal_dup_arr(tmpctx, u8, update, len, 0); serialized = tal_dup_talarr(tmpctx, u8, update);
if (!fromwire_channel_update(serialized, &signature, if (!fromwire_channel_update(serialized, &signature,
&chain_hash, &short_channel_id, &chain_hash, &short_channel_id,
&timestamp, &message_flags, &timestamp, &message_flags,