mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 04:34:20 +01:00
wire: Add patch file for peer storage bkp
Add msg type peer_storage and your_peer_storage
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
15
wire/extracted_peer_07_peer_storage.patch
Normal file
15
wire/extracted_peer_07_peer_storage.patch
Normal 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,
|
||||
@@ -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
|
||||
|
||||
@@ -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: */
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
Reference in New Issue
Block a user