Browse Source

sphinx: Make the sphinx_hop struct public

We're about to create a param helper for sphinx hops and this struct seems
like the correct place to store the result.
travis-debug
Christian Decker 5 years ago
parent
commit
f569b52681
  1. 11
      common/sphinx.c
  2. 11
      common/sphinx.h

11
common/sphinx.c

@ -37,17 +37,6 @@ struct keyset {
u8 gamma[KEY_LEN];
};
/*
* All the necessary information to generate a valid onion for this hop on a
* sphinx path. The payload is preserialized in order since the onion
* generation is payload agnostic. */
struct sphinx_hop {
struct pubkey pubkey;
enum sphinx_payload_type type;
const u8 *payload;
u8 hmac[HMAC_SIZE];
};
/* Encapsulates the information about a given payment path for the the onion
* routing algorithm.
*/

11
common/sphinx.h

@ -75,6 +75,17 @@ enum sphinx_payload_type {
SPHINX_RAW_PAYLOAD = 255,
};
/*
* All the necessary information to generate a valid onion for this hop on a
* sphinx path. The payload is preserialized in order since the onion
* generation is payload agnostic. */
struct sphinx_hop {
struct pubkey pubkey;
enum sphinx_payload_type type;
const u8 *payload;
u8 hmac[HMAC_SIZE];
};
struct route_step {
enum route_next_case nextcase;
struct onionpacket *next;

Loading…
Cancel
Save