mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 23:54:22 +01:00
common/sphinx: add realm flag so we can avoid legacy parsing.
For messages, we use the onion but payload lengths 0 and 1 aren't special. Create a flag to disable that logic. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
b162a0e5e2
commit
24984ec680
@@ -128,7 +128,7 @@ static struct route_step *decode_with_privkey(const tal_t *ctx, const u8 *onion,
|
||||
errx(1, "Error creating shared secret.");
|
||||
|
||||
step = process_onionpacket(ctx, &packet, &shared_secret, assocdata,
|
||||
tal_bytelen(assocdata));
|
||||
tal_bytelen(assocdata), true);
|
||||
return step;
|
||||
|
||||
}
|
||||
@@ -282,7 +282,7 @@ static void runtest(const char *filename)
|
||||
errx(1, "Error serializing message.");
|
||||
onion_payload_length(step->raw_payload,
|
||||
tal_bytelen(step->raw_payload),
|
||||
&valid, &type);
|
||||
true, &valid, &type);
|
||||
assert(valid);
|
||||
printf(" Type: %d\n", type);
|
||||
printf(" Payload: %s\n", tal_hex(ctx, step->raw_payload));
|
||||
|
||||
Reference in New Issue
Block a user