Browse Source

gossip: Added message for unsuccessful connection attempts

Signed-off-by: Christian Decker <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
committed by Rusty Russell
parent
commit
f5147f27c9
  1. 1
      gossipd/gossip.c
  2. 6
      gossipd/gossip_wire.csv
  3. 3
      lightningd/gossip_control.c

1
gossipd/gossip.c

@ -1913,6 +1913,7 @@ static struct io_plan *recv_req(struct io_conn *conn, struct daemon_conn *master
case WIRE_GOSSIP_RESOLVE_CHANNEL_REPLY:
case WIRE_GOSSIP_PEER_CONNECTED:
case WIRE_GOSSIP_PEER_ALREADY_CONNECTED:
case WIRE_GOSSIP_PEER_CONNECTION_FAILED:
case WIRE_GOSSIP_PEER_NONGOSSIP:
case WIRE_GOSSIP_GET_UPDATE:
case WIRE_GOSSIP_GET_UPDATE_REPLY:

6
gossipd/gossip_wire.csv

@ -43,6 +43,12 @@ gossip_peer_connected,,lfeatures,lflen*u8
gossip_peer_already_connected,3015
gossip_peer_already_connected,,id,struct pubkey
# gossipd -> master: attempted to connect, unsuccessful, gave up
gossip_peer_connection_failed,3020
gossip_peer_connection_failed,,id,struct pubkey
gossip_peer_connection_failed,,timeout,u32
gossip_peer_connection_failed,,attempts,u32
# Gossipd -> master: peer sent non-gossip packet. Two fds: peer and gossip
gossip_peer_nongossip,3003
gossip_peer_nongossip,,id,struct pubkey

Can't render this file because it has a wrong number of fields in line 5.

3
lightningd/gossip_control.c

@ -133,6 +133,9 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds)
case WIRE_GOSSIP_PEER_ALREADY_CONNECTED:
peer_already_connected(gossip->ld, msg);
break;
case WIRE_GOSSIP_PEER_CONNECTION_FAILED:
/* TODO(cdecker) Implement handler */
break;
case WIRE_GOSSIP_PEER_NONGOSSIP:
if (tal_count(fds) != 2)
return 2;

Loading…
Cancel
Save