mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
common/onion: expunge all trace of different onion styles.
In particular, remove special routines to pull length: it's there, take it and check it yourself. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
c8ad9e18a9
commit
8771c86379
@@ -270,18 +270,12 @@ static void runtest(const char *filename)
|
||||
decodetok = json_get_member(buffer, toks, "decode");
|
||||
|
||||
json_for_each_arr(i, hop, decodetok) {
|
||||
bool valid;
|
||||
|
||||
hexprivkey = json_strdup(ctx, buffer, hop);
|
||||
printf("Processing at hop %zu\n", i);
|
||||
step = decode_with_privkey(ctx, serialized, hexprivkey, associated_data);
|
||||
serialized = serialize_onionpacket(ctx, step->next);
|
||||
if (!serialized)
|
||||
errx(1, "Error serializing message.");
|
||||
onion_payload_length(step->raw_payload,
|
||||
tal_bytelen(step->raw_payload),
|
||||
true, &valid, NULL);
|
||||
assert(valid);
|
||||
printf(" Payload: %s\n", tal_hex(ctx, step->raw_payload));
|
||||
printf(" Next onion: %s\n", tal_hex(ctx, serialized));
|
||||
printf(" Next HMAC: %s\n",
|
||||
|
||||
Reference in New Issue
Block a user