gossipd: handle ping messages for remote peers too.

This simplifies our ping handling: make gossipd always do it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-24 09:56:43 +09:30
parent f8fa4213f1
commit a52d522525
10 changed files with 21 additions and 136 deletions

View File

@@ -47,6 +47,8 @@ bool is_msg_for_gossipd(const u8 *cursor)
case WIRE_QUERY_CHANNEL_RANGE:
case WIRE_REPLY_CHANNEL_RANGE:
case WIRE_GOSSIP_TIMESTAMP_FILTER:
case WIRE_PING:
case WIRE_PONG:
return true;
case WIRE_INIT:
case WIRE_ERROR:
@@ -64,8 +66,6 @@ bool is_msg_for_gossipd(const u8 *cursor)
case WIRE_COMMITMENT_SIGNED:
case WIRE_REVOKE_AND_ACK:
case WIRE_UPDATE_FEE:
case WIRE_PING:
case WIRE_PONG:
case WIRE_CHANNEL_REESTABLISH:
case WIRE_ANNOUNCEMENT_SIGNATURES:
break;