diff --git a/channeld/channeld.c b/channeld/channeld.c index af31c4476..f213b41f9 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -1855,11 +1855,6 @@ static void peer_in(struct peer *peer, const u8 *msg) case WIRE_SHUTDOWN: handle_peer_shutdown(peer, msg); return; -#if EXPERIMENTAL_FEATURES - case WIRE_INIT_RBF: - /* FIXME: handle this here */ - break; -#endif case WIRE_INIT: case WIRE_OPEN_CHANNEL: @@ -1878,6 +1873,9 @@ static void peer_in(struct peer *peer, const u8 *msg) case WIRE_TX_SIGNATURES: handle_unexpected_tx_sigs(peer, msg); return; + case WIRE_INIT_RBF: + case WIRE_ACK_RBF: + case WIRE_FAIL_RBF: case WIRE_BLACKLIST_PODLE: #endif break; diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index 12cfb8c7c..f761a9b25 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -767,6 +767,8 @@ static struct io_plan *peer_msg_in(struct io_conn *conn, case WIRE_OPEN_CHANNEL2: case WIRE_ACCEPT_CHANNEL2: case WIRE_INIT_RBF: + case WIRE_ACK_RBF: + case WIRE_FAIL_RBF: case WIRE_BLACKLIST_PODLE: #endif status_broken("peer %s: relayed unexpected msg of type %s", diff --git a/openingd/dualopend.c b/openingd/dualopend.c index 2083c914b..079c2a925 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -1407,6 +1407,8 @@ static bool run_tx_interactive(struct state *state, case WIRE_OPEN_CHANNEL2: case WIRE_ACCEPT_CHANNEL2: case WIRE_INIT_RBF: + case WIRE_ACK_RBF: + case WIRE_FAIL_RBF: case WIRE_BLACKLIST_PODLE: case WIRE_CHANNEL_ANNOUNCEMENT: case WIRE_CHANNEL_UPDATE: @@ -2706,7 +2708,8 @@ static u8 *handle_peer_in(struct state *state) enum peer_wire t = fromwire_peektype(msg); struct channel_id channel_id; - if (t == WIRE_OPEN_CHANNEL2) { + switch (t) { + case WIRE_OPEN_CHANNEL2: if (state->channel) { status_broken("Unexpected message %s", peer_wire_name(t)); @@ -2714,14 +2717,56 @@ static u8 *handle_peer_in(struct state *state) } accepter_start(state, msg); return NULL; - } else if (t == WIRE_TX_SIGNATURES) { + case WIRE_TX_SIGNATURES: handle_tx_sigs(state, msg); return NULL; - } else if (t == WIRE_FUNDING_LOCKED) { + case WIRE_FUNDING_LOCKED: return handle_funding_locked(state, msg); - } else if (t == WIRE_SHUTDOWN) { + case WIRE_SHUTDOWN: handle_peer_shutdown(state, msg); return NULL; + case WIRE_INIT_RBF: + // FIXME: rbf_start? + return NULL; + /* Otherwise we fall through */ + case WIRE_INIT: + case WIRE_ERROR: + case WIRE_OPEN_CHANNEL: + case WIRE_ACCEPT_CHANNEL: + case WIRE_FUNDING_CREATED: + case WIRE_FUNDING_SIGNED: + case WIRE_CLOSING_SIGNED: + case WIRE_UPDATE_ADD_HTLC: + case WIRE_UPDATE_FULFILL_HTLC: + case WIRE_UPDATE_FAIL_HTLC: + case WIRE_UPDATE_FAIL_MALFORMED_HTLC: + case WIRE_COMMITMENT_SIGNED: + case WIRE_REVOKE_AND_ACK: + case WIRE_UPDATE_FEE: + case WIRE_CHANNEL_REESTABLISH: + case WIRE_ANNOUNCEMENT_SIGNATURES: + case WIRE_GOSSIP_TIMESTAMP_FILTER: + case WIRE_ONION_MESSAGE: + case WIRE_ACCEPT_CHANNEL2: + case WIRE_TX_ADD_INPUT: + case WIRE_TX_REMOVE_INPUT: + case WIRE_TX_ADD_OUTPUT: + case WIRE_TX_REMOVE_OUTPUT: + case WIRE_TX_COMPLETE: + case WIRE_ACK_RBF: + case WIRE_FAIL_RBF: + case WIRE_BLACKLIST_PODLE: + case WIRE_CHANNEL_ANNOUNCEMENT: + case WIRE_CHANNEL_UPDATE: + case WIRE_NODE_ANNOUNCEMENT: + case WIRE_QUERY_CHANNEL_RANGE: + case WIRE_REPLY_CHANNEL_RANGE: + case WIRE_QUERY_SHORT_CHANNEL_IDS: + case WIRE_REPLY_SHORT_CHANNEL_IDS_END: + case WIRE_WARNING: + case WIRE_PING: + case WIRE_PONG: + break; } #if DEVELOPER diff --git a/wire/extracted_peer_experimental_dual_fund_more_more.patch b/wire/extracted_peer_experimental_dual_fund_more_more.patch new file mode 100644 index 000000000..dd9296b98 --- /dev/null +++ b/wire/extracted_peer_experimental_dual_fund_more_more.patch @@ -0,0 +1,18 @@ +--- wire/peer_exp_wire.csv 2021-01-07 19:57:53.230947150 -0600 ++++ - 2021-01-08 15:17:40.600855619 -0600 +@@ -172,8 +172,14 @@ + msgdata,init_rbf,channel_id,channel_id, + msgdata,init_rbf,funding_satoshis,u64, + msgdata,init_rbf,locktime,u32, +-msgdata,init_rbf,feerate_per_kw,u32, + msgdata,init_rbf,fee_step,byte, ++msgtype,ack_rbf,73 ++msgdata,ack_rbf,channel_id,channel_id, ++msgdata,ack_rbf,funding_satoshis,u64, ++msgtype,fail_rbf,74 ++msgdata,fail_rbf,channel_id,channel_id, ++msgdata,fail_rbf,len,u16, ++msgdata,fail_rbf,data,byte,len + msgtype,shutdown,38 + msgdata,shutdown,channel_id,channel_id, + msgdata,shutdown,len,u16, diff --git a/wire/peer_wire.c b/wire/peer_wire.c index 82bd3009b..caaaac42d 100644 --- a/wire/peer_wire.c +++ b/wire/peer_wire.c @@ -44,6 +44,8 @@ static bool unknown_type(enum peer_wire t) case WIRE_OPEN_CHANNEL2: case WIRE_ACCEPT_CHANNEL2: case WIRE_INIT_RBF: + case WIRE_ACK_RBF: + case WIRE_FAIL_RBF: case WIRE_BLACKLIST_PODLE: #endif return false; @@ -95,6 +97,8 @@ bool is_msg_for_gossipd(const u8 *cursor) case WIRE_OPEN_CHANNEL2: case WIRE_ACCEPT_CHANNEL2: case WIRE_INIT_RBF: + case WIRE_ACK_RBF: + case WIRE_FAIL_RBF: case WIRE_BLACKLIST_PODLE: #endif break;