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

@@ -205,7 +205,7 @@ int main(int argc, char **argv)
} else if (streq(argv[1], "unwrap")) {
struct privkey privkey;
struct pubkey blinding;
u8 onion[TOTAL_PACKET_SIZE], *dec;
u8 onion[TOTAL_PACKET_SIZE(ROUTING_INFO_SIZE)], *dec;
struct onionpacket op;
struct secret ss, onion_ss;
struct secret hmac, rho;