daemon: check and use routing info in HTLC packet.

We only support being the end node for the moment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-06-30 09:08:10 +09:30
parent f4f0c1aa18
commit b2fdc86740
3 changed files with 104 additions and 23 deletions

View File

@@ -188,9 +188,10 @@ void queue_pkt_htlc_add(struct peer *peer,
if (!blocks_to_abs_locktime(expiry, &locktime))
fatal("Invalid locktime?");
u->expiry = abs_locktime_to_proto(u, &locktime);
/* FIXME: routing! */
u->route = tal(u, Routing);
routing__init(u->route);
u->route->info.data = tal_dup_arr(u, u8, route, tal_count(route), 0);
u->route->info.len = tal_count(u->route->info.data);
/* BOLT #2:
*