Browse Source

Allow pong when in CHANNELD_AWAITING_LOCKIN

Right now it allows ping but not pong. 
If A sends a ping expecting a pong to B during CHANNELD_AWAITING_LOCKIN,
It would result in 
`STATUS_FAIL_PEER_BAD: WIRE_PONG (19) before funding locked`    
resulting in a unilateral channel close by A.
ppa-0.6.1
Ephraim Raj 7 years ago
committed by Christian Decker
parent
commit
a095a59083
  1. 3
      channeld/channel.c

3
channeld/channel.c

@ -1579,7 +1579,8 @@ static void peer_in(struct peer *peer, const u8 *msg)
&& type != WIRE_CHANNEL_ANNOUNCEMENT
&& type != WIRE_CHANNEL_UPDATE
&& type != WIRE_NODE_ANNOUNCEMENT
&& type != WIRE_PING) {
&& type != WIRE_PING
&& type != WIRE_PONG) {
peer_failed(PEER_FD,
&peer->cs,
&peer->channel_id,

Loading…
Cancel
Save