gossipd: get_channel() wrapper for channel lookup.

We rename the current routing.c get_channel to find_channel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-03-01 19:52:28 +10:30
committed by Christian Decker
parent 042d5d13f5
commit affc1be4d6
2 changed files with 14 additions and 13 deletions

View File

@@ -124,6 +124,13 @@ struct routing_state {
UINTMAP(struct routing_channel*) channels;
};
static inline struct routing_channel *
get_channel(const struct routing_state *rstate,
const struct short_channel_id *scid)
{
return uintmap_get(&rstate->channels, short_channel_id_to_uint(scid));
}
struct route_hop {
struct short_channel_id channel_id;
struct pubkey nodeid;