mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
sphinx: add brackets around constant definition
Always do this, otherwise "MACRO * foo" can have unexpected results. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
34b4134cb0
commit
8599d63256
@ -12,7 +12,7 @@
|
||||
|
||||
#define BLINDING_FACTOR_SIZE 32
|
||||
#define SHARED_SECRET_SIZE 32
|
||||
#define NUM_STREAM_BYTES (2 * NUM_MAX_HOPS + 2) * SECURITY_PARAMETER
|
||||
#define NUM_STREAM_BYTES ((2 * NUM_MAX_HOPS + 2) * SECURITY_PARAMETER)
|
||||
#define KEY_LEN 32
|
||||
|
||||
struct hop_params {
|
||||
|
@ -13,11 +13,11 @@
|
||||
#define SECURITY_PARAMETER 20
|
||||
#define NUM_MAX_HOPS 20
|
||||
#define HOP_PAYLOAD_SIZE 20
|
||||
#define TOTAL_HOP_PAYLOAD_SIZE NUM_MAX_HOPS * HOP_PAYLOAD_SIZE
|
||||
#define TOTAL_HOP_PAYLOAD_SIZE (NUM_MAX_HOPS * HOP_PAYLOAD_SIZE)
|
||||
#define MESSAGE_SIZE 0
|
||||
#define ROUTING_INFO_SIZE 2 * NUM_MAX_HOPS * SECURITY_PARAMETER
|
||||
#define TOTAL_PACKET_SIZE 1 + 33 + SECURITY_PARAMETER + ROUTING_INFO_SIZE + \
|
||||
TOTAL_HOP_PAYLOAD_SIZE + MESSAGE_SIZE
|
||||
#define ROUTING_INFO_SIZE (2 * NUM_MAX_HOPS * SECURITY_PARAMETER)
|
||||
#define TOTAL_PACKET_SIZE (1 + 33 + SECURITY_PARAMETER + ROUTING_INFO_SIZE + \
|
||||
TOTAL_HOP_PAYLOAD_SIZE + MESSAGE_SIZE)
|
||||
|
||||
struct onionpacket {
|
||||
/* Cleartext information */
|
||||
|
Loading…
Reference in New Issue
Block a user