common/sphinx: make TOTAL_PACKET_SIZE a macro.

This paves the way for using it on different-sized onions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-12-08 17:18:53 +10:30
committed by Christian Decker
parent dc67b60e28
commit 3776af4a35
14 changed files with 27 additions and 27 deletions

View File

@@ -218,7 +218,7 @@ struct msg_update_add_htlc {
struct amount_msat amount_msat;
u32 expiry;
struct sha256 payment_hash;
u8 onion_routing_packet[TOTAL_PACKET_SIZE];
u8 onion_routing_packet[TOTAL_PACKET_SIZE(ROUTING_INFO_SIZE)];
};
struct msg_update_fee {
struct channel_id channel_id;