wire: Add patch file for peer storage bkp

Add msg type peer_storage and your_peer_storage
This commit is contained in:
adi2011
2023-02-02 20:31:22 +10:30
committed by Alex Myers
parent d7bcac2ae7
commit 5f481aaf96
10 changed files with 46 additions and 3 deletions

View File

@@ -2300,6 +2300,8 @@ static void peer_in(struct peer *peer, const u8 *msg)
case WIRE_WARNING:
case WIRE_ERROR:
case WIRE_ONION_MESSAGE:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
abort();
}

View File

@@ -87,6 +87,8 @@ static bool is_msg_gossip_broadcast(const u8 *cursor)
case WIRE_TX_INIT_RBF:
case WIRE_TX_ACK_RBF:
case WIRE_TX_ABORT:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
case WIRE_OPEN_CHANNEL2:
case WIRE_ACCEPT_CHANNEL2:
#if EXPERIMENTAL_FEATURES

View File

@@ -92,6 +92,8 @@ static bool public_msg_type(enum peer_wire type)
case WIRE_REPLY_CHANNEL_RANGE:
case WIRE_GOSSIP_TIMESTAMP_FILTER:
case WIRE_ONION_MESSAGE:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif

View File

@@ -385,6 +385,8 @@ static bool is_urgent(enum peer_wire type)
case WIRE_REPLY_CHANNEL_RANGE:
case WIRE_GOSSIP_TIMESTAMP_FILTER:
case WIRE_ONION_MESSAGE:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif

View File

@@ -569,6 +569,8 @@ static void handle_recv_gossip(struct daemon *daemon, const u8 *outermsg)
case WIRE_OPEN_CHANNEL2:
case WIRE_ACCEPT_CHANNEL2:
case WIRE_ONION_MESSAGE:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif

View File

@@ -1439,6 +1439,8 @@ static u8 *opening_negotiate_msg(const tal_t *ctx, struct state *state)
case WIRE_WARNING:
case WIRE_PING:
case WIRE_PONG:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
@@ -1813,6 +1815,8 @@ static bool run_tx_interactive(struct state *state,
case WIRE_REPLY_SHORT_CHANNEL_IDS_END:
case WIRE_PING:
case WIRE_PONG:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
@@ -4170,6 +4174,8 @@ static u8 *handle_peer_in(struct state *state)
case WIRE_WARNING:
case WIRE_PING:
case WIRE_PONG:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif

View File

@@ -0,0 +1,15 @@
--- wire/peer_wire.csv 2022-07-18 13:49:29.079542016 +0530
+++ - 2022-07-18 13:58:17.706696582 +0530
@@ -249,6 +249,12 @@
msgdata,channel_reestablish,next_revocation_number,u64,
msgdata,channel_reestablish,your_last_per_commitment_secret,byte,32
msgdata,channel_reestablish,my_current_per_commitment_point,point,
+msgtype,peer_storage,7
+msgdata,peer_storage,len,u16,
+msgdata,peer_storage,blob,byte,len
+msgtype,your_peer_storage,9
+msgdata,your_peer_storage,len,u16,
+msgdata,your_peer_storage,blob,byte,len
msgtype,announcement_signatures,259
msgdata,announcement_signatures,channel_id,channel_id,
msgdata,announcement_signatures,short_channel_id,short_channel_id,

View File

@@ -13,6 +13,6 @@
+tlvdata,channel_reestablish_tlvs,current_channel_type,type,byte,...
+tlvtype,channel_reestablish_tlvs,upgradable_channel_type,7
+tlvdata,channel_reestablish_tlvs,upgradable_channel_type,type,byte,...
msgtype,announcement_signatures,259
msgdata,announcement_signatures,channel_id,channel_id,
msgdata,announcement_signatures,short_channel_id,short_channel_id,
msgtype,peer_storage,7
msgdata,peer_storage,len,u16,
msgdata,peer_storage,blob,byte,len

View File

@@ -45,6 +45,8 @@ static bool unknown_type(enum peer_wire t)
case WIRE_TX_INIT_RBF:
case WIRE_TX_ACK_RBF:
case WIRE_TX_ABORT:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
case WIRE_OPEN_CHANNEL2:
case WIRE_ACCEPT_CHANNEL2:
#if EXPERIMENTAL_FEATURES
@@ -101,6 +103,8 @@ bool is_msg_for_gossipd(const u8 *cursor)
case WIRE_OPEN_CHANNEL2:
case WIRE_ACCEPT_CHANNEL2:
case WIRE_ONION_MESSAGE:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
#if EXPERIMENTAL_FEATURES
case WIRE_STFU:
#endif
@@ -140,6 +144,8 @@ bool extract_channel_id(const u8 *in_pkt, struct channel_id *channel_id)
case WIRE_REPLY_CHANNEL_RANGE:
case WIRE_GOSSIP_TIMESTAMP_FILTER:
case WIRE_ONION_MESSAGE:
case WIRE_PEER_STORAGE:
case WIRE_YOUR_PEER_STORAGE:
return false;
/* Special cases: */

View File

@@ -264,6 +264,12 @@ msgdata,channel_reestablish,next_commitment_number,u64,
msgdata,channel_reestablish,next_revocation_number,u64,
msgdata,channel_reestablish,your_last_per_commitment_secret,byte,32
msgdata,channel_reestablish,my_current_per_commitment_point,point,
msgtype,peer_storage,7
msgdata,peer_storage,len,u16,
msgdata,peer_storage,blob,byte,len
msgtype,your_peer_storage,9
msgdata,your_peer_storage,len,u16,
msgdata,your_peer_storage,blob,byte,len
msgtype,announcement_signatures,259
msgdata,announcement_signatures,channel_id,channel_id,
msgdata,announcement_signatures,short_channel_id,short_channel_id,
1 msgtype,init,16
264 msgdata,channel_reestablish,next_revocation_number,u64,
265 msgdata,channel_reestablish,your_last_per_commitment_secret,byte,32
266 msgdata,channel_reestablish,my_current_per_commitment_point,point,
267 msgtype,peer_storage,7
268 msgdata,peer_storage,len,u16,
269 msgdata,peer_storage,blob,byte,len
270 msgtype,your_peer_storage,9
271 msgdata,your_peer_storage,len,u16,
272 msgdata,your_peer_storage,blob,byte,len
273 msgtype,announcement_signatures,259
274 msgdata,announcement_signatures,channel_id,channel_id,
275 msgdata,announcement_signatures,short_channel_id,short_channel_id,