mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
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:
parent
733e0aeccf
commit
996567c250
6 changed files with 10 additions and 3 deletions
|
@ -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_ACCEPT_CHANNEL:
|
||||||
case WIRE_FUNDING_CREATED:
|
case WIRE_FUNDING_CREATED:
|
||||||
case WIRE_FUNDING_SIGNED:
|
case WIRE_FUNDING_SIGNED:
|
||||||
|
case WIRE_CHANNEL_REESTABLISH:
|
||||||
goto badmessage;
|
goto badmessage;
|
||||||
|
|
||||||
case WIRE_SHUTDOWN:
|
case WIRE_SHUTDOWN:
|
||||||
|
|
|
@ -241,6 +241,7 @@ static struct io_plan *peer_msgin(struct io_conn *conn,
|
||||||
return peer_read_message(conn, &peer->pcs, peer_msgin);
|
return peer_read_message(conn, &peer->pcs, peer_msgin);
|
||||||
|
|
||||||
case WIRE_OPEN_CHANNEL:
|
case WIRE_OPEN_CHANNEL:
|
||||||
|
case WIRE_CHANNEL_REESTABLISH:
|
||||||
case WIRE_ACCEPT_CHANNEL:
|
case WIRE_ACCEPT_CHANNEL:
|
||||||
case WIRE_FUNDING_CREATED:
|
case WIRE_FUNDING_CREATED:
|
||||||
case WIRE_FUNDING_SIGNED:
|
case WIRE_FUNDING_SIGNED:
|
||||||
|
|
|
@ -192,7 +192,7 @@ static bool peer_reconnected(struct lightningd *ld,
|
||||||
*
|
*
|
||||||
* On disconnection, the funder MUST remember the channel for
|
* On disconnection, the funder MUST remember the channel for
|
||||||
* reconnection if it has broadcast the funding transaction,
|
* reconnection if it has broadcast the funding transaction,
|
||||||
* otherwise it MUST NOT.
|
* otherwise it SHOULD NOT.
|
||||||
*/
|
*/
|
||||||
/* Free peer, which will discard HSM response. */
|
/* Free peer, which will discard HSM response. */
|
||||||
tal_free(peer);
|
tal_free(peer);
|
||||||
|
|
|
@ -104,11 +104,11 @@ static inline bool peer_on_chain(const struct peer *peer)
|
||||||
*
|
*
|
||||||
* On disconnection, the funder MUST remember the channel for
|
* On disconnection, the funder MUST remember the channel for
|
||||||
* reconnection if it has broadcast the funding transaction, otherwise it
|
* 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
|
* On disconnection, the non-funding node MUST remember the channel for
|
||||||
* reconnection if it has sent the `funding_signed` message, otherwise
|
* 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)
|
static inline bool peer_persists(const struct peer *peer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,6 +97,10 @@ revoke_and_ack,64,next_per_commitment_point,33
|
||||||
update_fee,134
|
update_fee,134
|
||||||
update_fee,0,channel_id,32
|
update_fee,0,channel_id,32
|
||||||
update_fee,32,feerate_per_kw,4
|
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,259
|
||||||
announcement_signatures,0,channel_id,32
|
announcement_signatures,0,channel_id,32
|
||||||
announcement_signatures,32,short_channel_id,8
|
announcement_signatures,32,short_channel_id,8
|
||||||
|
|
|
@ -19,6 +19,7 @@ static bool unknown_type(enum wire_type t)
|
||||||
case WIRE_COMMITMENT_SIGNED:
|
case WIRE_COMMITMENT_SIGNED:
|
||||||
case WIRE_REVOKE_AND_ACK:
|
case WIRE_REVOKE_AND_ACK:
|
||||||
case WIRE_UPDATE_FEE:
|
case WIRE_UPDATE_FEE:
|
||||||
|
case WIRE_CHANNEL_REESTABLISH:
|
||||||
case WIRE_ANNOUNCEMENT_SIGNATURES:
|
case WIRE_ANNOUNCEMENT_SIGNATURES:
|
||||||
case WIRE_CHANNEL_ANNOUNCEMENT:
|
case WIRE_CHANNEL_ANNOUNCEMENT:
|
||||||
case WIRE_NODE_ANNOUNCEMENT:
|
case WIRE_NODE_ANNOUNCEMENT:
|
||||||
|
|
Loading…
Add table
Reference in a new issue