sphinx: Expose sphinx_add_raw_hop for testing

Shouldn't be used directly, but really useful for testing, since we can just
cram a huge payload in without having to be valid. And we don't have a TLV
spec yet.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2019-02-18 14:02:25 +01:00
committed by Rusty Russell
parent 75c0160c08
commit 7bc4cf83b1
2 changed files with 38 additions and 21 deletions

View File

@@ -231,6 +231,12 @@ struct sphinx_path *sphinx_path_new_with_key(const tal_t *ctx,
* Add a V0 (Realm 0) single frame hop to the path.
*/
void sphinx_add_v0_hop(struct sphinx_path *path, const struct pubkey *pubkey,
const struct short_channel_id *scid,
struct amount_msat forward, u32 outgoing_cltv);
const struct short_channel_id *scid, struct amount_msat forward,
u32 outgoing_cltv);
/**
* Add a raw payload hop to the path.
*/
void sphinx_add_raw_hop(struct sphinx_path *path, const struct pubkey *pubkey,
u8 realm, const u8 *payload);
#endif /* LIGHTNING_COMMON_SPHINX_H */