routing: use ids, not nodes in interface.

Turns out to be more convenient.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-18 14:25:13 +09:30
parent 8a3c9908ce
commit 87da9634bc
3 changed files with 75 additions and 29 deletions

View File

@@ -20,8 +20,8 @@ struct node_connection {
struct node {
struct pubkey id;
/* Routes connecting to us. */
struct node_connection *conns;
/* Routes connecting to us, from us. */
struct node_connection **in, **out;
/* Temporary data for routefinding. */
struct {
@@ -46,7 +46,8 @@ s64 connection_fee(const struct node_connection *c, u64 msatoshi);
/* Updates existing connection, or creates new one as required. */
struct node_connection *add_connection(struct lightningd_state *dstate,
struct node *from, struct node *to,
const struct pubkey *from,
const struct pubkey *to,
u32 base_fee, s32 proportional_fee,
u32 delay, u32 min_blocks);