@@ -2362,6 +2362,35 @@ static struct commitsig_info *handle_peer_commit_sig_batch(struct peer *peer,
23622362 allow_empty_commit , msg_batch );
23632363}
23642364
2365+ static void handle_peer_start_batch (struct peer * peer , const u8 * msg )
2366+ {
2367+ u16 batch_size ;
2368+ struct channel_id channel_id ;
2369+ struct tlv_start_batch_tlvs * tlvs ;
2370+ if (!fromwire_start_batch (tmpctx , msg , & channel_id , & batch_size , & tlvs ))
2371+ peer_failed_warn (peer -> pps , & peer -> channel_id ,
2372+ "Bad start_batch %s" , tal_hex (msg , msg ));
2373+
2374+ if (!tlvs || !tlvs -> batch_info
2375+ || * tlvs -> batch_info != WIRE_COMMITMENT_SIGNED ) {
2376+ status_unusual ("Ignoring Unrecognized start_batch message type"
2377+ " %s, expected WIRE_COMMITMENT_SIGNED." ,
2378+ tlvs && tlvs -> batch_info
2379+ ? peer_wire_name (* tlvs -> batch_info )
2380+ : "N/A" );
2381+ return ;
2382+ }
2383+
2384+ handle_peer_commit_sig_batch (peer , peer_read (tmpctx , peer -> pps ), 0 ,
2385+ peer -> channel -> funding_pubkey [REMOTE ],
2386+ NULL , 0 , 0 ,
2387+ peer -> next_index [LOCAL ],
2388+ & peer -> next_local_per_commit ,
2389+ false,
2390+ batch_size );
2391+ }
2392+
2393+
23652394/* Pops the penalty base for the given commitnum from our internal list. There
23662395 * may not be one, in which case we return NULL and leave the list
23672396 * unmodified. */
@@ -4828,6 +4857,7 @@ static void peer_in(struct peer *peer, const u8 *msg)
48284857 handle_peer_add_htlc (peer , msg );
48294858 return ;
48304859 case WIRE_START_BATCH :
4860+ handle_peer_start_batch (peer , msg );
48314861 return ;
48324862 case WIRE_COMMITMENT_SIGNED :
48334863 handle_peer_commit_sig_batch (peer , msg , 0 ,
0 commit comments