lightningd: update BOLT to add channel_reestablish message.

We don't handle it yet though.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-06-20 15:10:03 +09:30
parent 733e0aeccf
commit 996567c250
6 changed files with 10 additions and 3 deletions

View file

@ -977,6 +977,7 @@ static struct io_plan *peer_in(struct io_conn *conn, struct peer *peer, u8 *msg)
case WIRE_ACCEPT_CHANNEL:
case WIRE_FUNDING_CREATED:
case WIRE_FUNDING_SIGNED:
case WIRE_CHANNEL_REESTABLISH:
goto badmessage;
case WIRE_SHUTDOWN:

View file

@ -241,6 +241,7 @@ static struct io_plan *peer_msgin(struct io_conn *conn,
return peer_read_message(conn, &peer->pcs, peer_msgin);
case WIRE_OPEN_CHANNEL:
case WIRE_CHANNEL_REESTABLISH:
case WIRE_ACCEPT_CHANNEL:
case WIRE_FUNDING_CREATED:
case WIRE_FUNDING_SIGNED:

View file

@ -192,7 +192,7 @@ static bool peer_reconnected(struct lightningd *ld,
*
* On disconnection, the funder MUST remember the channel for
* reconnection if it has broadcast the funding transaction,
* otherwise it MUST NOT.
* otherwise it SHOULD NOT.
*/
/* Free peer, which will discard HSM response. */
tal_free(peer);

View file

@ -104,11 +104,11 @@ static inline bool peer_on_chain(const struct peer *peer)
*
* On disconnection, the funder MUST remember the channel for
* reconnection if it has broadcast the funding transaction, otherwise it
* MUST NOT.
* SHOULD NOT.
*
* On disconnection, the non-funding node MUST remember the channel for
* reconnection if it has sent the `funding_signed` message, otherwise
* it MUST NOT.
* it SHOULD NOT.
*/
static inline bool peer_persists(const struct peer *peer)
{

View file

@ -97,6 +97,10 @@ revoke_and_ack,64,next_per_commitment_point,33
update_fee,134
update_fee,0,channel_id,32
update_fee,32,feerate_per_kw,4
channel_reestablish,136
channel_reestablish,0,channel_id,32
channel_reestablish,32,commitments_received,8
channel_reestablish,40,revocations_received,8
announcement_signatures,259
announcement_signatures,0,channel_id,32
announcement_signatures,32,short_channel_id,8

View file

@ -19,6 +19,7 @@ static bool unknown_type(enum wire_type t)
case WIRE_COMMITMENT_SIGNED:
case WIRE_REVOKE_AND_ACK:
case WIRE_UPDATE_FEE:
case WIRE_CHANNEL_REESTABLISH:
case WIRE_ANNOUNCEMENT_SIGNATURES:
case WIRE_CHANNEL_ANNOUNCEMENT:
case WIRE_NODE_ANNOUNCEMENT: