mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
gossip: Adding locally added channels to channels map
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
26b5588656
commit
a88076b1b0
@@ -96,6 +96,9 @@ struct routing_channel {
|
||||
struct node *nodes[2];
|
||||
|
||||
u64 msg_indexes[3];
|
||||
|
||||
/* Is this a public channel, or was it only added locally? */
|
||||
bool public;
|
||||
};
|
||||
|
||||
struct routing_state {
|
||||
@@ -180,6 +183,15 @@ void routing_failure(struct routing_state *rstate,
|
||||
enum onion_type failcode,
|
||||
const u8 *channel_update);
|
||||
|
||||
/* routing_channel constructor */
|
||||
struct routing_channel *routing_channel_new(const tal_t *ctx,
|
||||
struct short_channel_id *scid);
|
||||
|
||||
/* Add the connection to the channel */
|
||||
void channel_add_connection(struct routing_state *rstate,
|
||||
struct routing_channel *chan,
|
||||
struct node_connection *nc);
|
||||
|
||||
/* Utility function that, given a source and a destination, gives us
|
||||
* the direction bit the matching channel should get */
|
||||
#define get_channel_direction(from, to) (pubkey_cmp(from, to) > 0)
|
||||
|
||||
Reference in New Issue
Block a user