mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
gossip: Added internal gossip message to add a local channel
Couldn't find a good place to put these messages, we probably want to do the same capability based request routing that we did for the HSM, but for now this just defines the message in the master messages file. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
28f02e0c0e
commit
2988e290cf
3 changed files with 20 additions and 1 deletions
|
@ -1539,6 +1539,7 @@ static struct io_plan *recv_req(struct io_conn *conn, struct daemon_conn *master
|
|||
case WIRE_GOSSIP_GETPEERS_REQUEST:
|
||||
return get_peers(conn, daemon, master->msg_in);
|
||||
|
||||
/* We send these, we don't receive them */
|
||||
case WIRE_GOSSIPCTL_RELEASE_PEER_REPLY:
|
||||
case WIRE_GOSSIPCTL_RELEASE_PEER_REPLYFAIL:
|
||||
case WIRE_GOSSIP_GETNODES_REPLY:
|
||||
|
@ -1552,6 +1553,7 @@ static struct io_plan *recv_req(struct io_conn *conn, struct daemon_conn *master
|
|||
case WIRE_GOSSIP_GET_UPDATE:
|
||||
case WIRE_GOSSIP_GET_UPDATE_REPLY:
|
||||
case WIRE_GOSSIP_SEND_GOSSIP:
|
||||
case WIRE_GOSSIP_LOCAL_ADD_CHANNEL:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,3 +144,16 @@ gossip_send_gossip,3016
|
|||
gossip_send_gossip,,gossip_index,u64
|
||||
gossip_send_gossip,,len,u16
|
||||
gossip_send_gossip,,gossip,len*u8
|
||||
|
||||
# Both sides have seen the funding tx being locked, but we have not
|
||||
# yet reached the announcement depth. So we add the channel locally so
|
||||
# we can use it already.
|
||||
gossip_local_add_channel,3017
|
||||
gossip_local_add_channel,,short_channel_id,struct short_channel_id
|
||||
gossip_local_add_channel,,chain_hash,struct sha256_double
|
||||
gossip_local_add_channel,,remote_node_id,struct pubkey
|
||||
gossip_local_add_channel,,flags,u16
|
||||
gossip_local_add_channel,,cltv_expiry_delta,u16
|
||||
gossip_local_add_channel,,htlc_minimum_msat,u64
|
||||
gossip_local_add_channel,,fee_base_msat,u32
|
||||
gossip_local_add_channel,,fee_proportional_millionths,u32
|
|
|
@ -83,6 +83,10 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds)
|
|||
case WIRE_GOSSIPCTL_RELEASE_PEER_REPLY:
|
||||
case WIRE_GOSSIPCTL_RELEASE_PEER_REPLYFAIL:
|
||||
break;
|
||||
/* These are inter-daemon messages, not received by us */
|
||||
case WIRE_GOSSIP_LOCAL_ADD_CHANNEL:
|
||||
break;
|
||||
|
||||
case WIRE_GOSSIP_PEER_CONNECTED:
|
||||
if (tal_count(fds) != 2)
|
||||
return 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue