mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
sphinx: update padding as per latest BOLT 4
BOLT 04: increase max size of onion payload messages (#227) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
fea412dd94
commit
1ecd687eec
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#define NUM_STREAM_BYTES ((NUM_MAX_HOPS + 1) * HOP_DATA_SIZE)
|
#define NUM_STREAM_BYTES ((NUM_MAX_HOPS + 1) * HOP_DATA_SIZE)
|
||||||
#define KEY_LEN 32
|
#define KEY_LEN 32
|
||||||
#define ONION_REPLY_SIZE 128
|
#define ONION_REPLY_SIZE 256
|
||||||
|
|
||||||
struct hop_params {
|
struct hop_params {
|
||||||
u8 secret[SHARED_SECRET_SIZE];
|
u8 secret[SHARED_SECRET_SIZE];
|
||||||
@@ -479,7 +479,7 @@ u8 *create_onionreply(const tal_t *ctx, const struct secret *shared_secret,
|
|||||||
/* BOLT #4:
|
/* BOLT #4:
|
||||||
*
|
*
|
||||||
* The node SHOULD set `pad` such that the `failure_len` plus
|
* The node SHOULD set `pad` such that the `failure_len` plus
|
||||||
* `pad_len` is equal to 128. This is 28 bytes longer than then the
|
* `pad_len` is equal to 256. This is 118 bytes longer than then the
|
||||||
* longest currently-defined message.
|
* longest currently-defined message.
|
||||||
*/
|
*/
|
||||||
assert(tal_len(payload) == ONION_REPLY_SIZE + 4);
|
assert(tal_len(payload) == ONION_REPLY_SIZE + 4);
|
||||||
|
|||||||
Reference in New Issue
Block a user