EXPERIMENTAL: import spec for quiescence.

Imported from commit b96218b06b68cf349457b282f05d48ebd89c7273

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-05-31 12:37:50 +09:30 committed by neil saitug
parent 0b01a8c76f
commit f7adbd5d58
5 changed files with 33 additions and 0 deletions

View file

@ -1949,6 +1949,9 @@ static void peer_in(struct peer *peer, const u8 *msg)
return;
case WIRE_INIT_RBF:
case WIRE_ACK_RBF:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
break;
case WIRE_CHANNEL_REESTABLISH:

View file

@ -741,6 +741,9 @@ static struct io_plan *peer_msg_in(struct io_conn *conn,
case WIRE_ACCEPT_CHANNEL2:
case WIRE_INIT_RBF:
case WIRE_ACK_RBF:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
status_broken("peer %s: relayed unexpected msg of type %s",
type_to_string(tmpctx, struct node_id, &peer->id),
peer_wire_name(fromwire_peektype(msg)));

View file

@ -1273,6 +1273,9 @@ static u8 *opening_negotiate_msg(const tal_t *ctx, struct state *state)
case WIRE_WARNING:
case WIRE_PING:
case WIRE_PONG:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
break;
}
@ -1614,6 +1617,9 @@ static bool run_tx_interactive(struct state *state,
case WIRE_REPLY_SHORT_CHANNEL_IDS_END:
case WIRE_PING:
case WIRE_PONG:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
open_err_warn(state, "Unexpected wire message %s",
tal_hex(tmpctx, msg));
return false;
@ -3402,6 +3408,9 @@ static u8 *handle_peer_in(struct state *state)
case WIRE_WARNING:
case WIRE_PING:
case WIRE_PONG:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
break;
}

View file

@ -0,0 +1,12 @@
--- wire/peer_exp_wire.csv 2021-05-17 09:30:02.302260471 +0930
+++ - 2021-05-31 12:20:36.390910632 +0930
@@ -120,6 +82,9 @@
msgtype,ack_rbf,73
msgdata,ack_rbf,channel_id,channel_id,
msgdata,ack_rbf,funding_satoshis,u64,
+msgtype,stfu,2
+msgdata,stfu,channel_id,channel_id,
+msgdata,stfu,initiator,u8,
msgtype,shutdown,38
msgdata,shutdown,channel_id,channel_id,
msgdata,shutdown,len,u16,

View file

@ -44,6 +44,9 @@ static bool unknown_type(enum peer_wire t)
case WIRE_ACCEPT_CHANNEL2:
case WIRE_INIT_RBF:
case WIRE_ACK_RBF:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
return false;
}
return true;
@ -93,6 +96,9 @@ bool is_msg_for_gossipd(const u8 *cursor)
case WIRE_ACCEPT_CHANNEL2:
case WIRE_INIT_RBF:
case WIRE_ACK_RBF:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
break;
}
return false;