@@ -2325,6 +2325,35 @@ static struct commitsig_info *handle_peer_commit_sig_batch(struct peer *peer,
23252325 allow_empty_commit , msg_batch );
23262326}
23272327
2328+ static void handle_peer_start_batch (struct peer * peer , const u8 * msg )
2329+ {
2330+ u16 batch_size ;
2331+ struct channel_id channel_id ;
2332+ struct tlv_start_batch_tlvs * tlvs ;
2333+ if (!fromwire_start_batch (tmpctx , msg , & channel_id , & batch_size , & tlvs ))
2334+ peer_failed_warn (peer -> pps , & peer -> channel_id ,
2335+ "Bad start_batch %s" , tal_hex (msg , msg ));
2336+
2337+ if (!tlvs || !tlvs -> batch_info
2338+ || * tlvs -> batch_info != WIRE_COMMITMENT_SIGNED ) {
2339+ status_unusual ("Ignoring Unrecognized start_batch message type"
2340+ " %s, expected WIRE_COMMITMENT_SIGNED." ,
2341+ tlvs && tlvs -> batch_info
2342+ ? peer_wire_name (* tlvs -> batch_info )
2343+ : "N/A" );
2344+ return ;
2345+ }
2346+
2347+ handle_peer_commit_sig_batch (peer , peer_read (tmpctx , peer -> pps ), 0 ,
2348+ peer -> channel -> funding_pubkey [REMOTE ],
2349+ NULL , 0 , 0 ,
2350+ peer -> next_index [LOCAL ],
2351+ & peer -> next_local_per_commit ,
2352+ false,
2353+ batch_size );
2354+ }
2355+
2356+
23282357/* Pops the penalty base for the given commitnum from our internal list. There
23292358 * may not be one, in which case we return NULL and leave the list
23302359 * unmodified. */
@@ -4791,6 +4820,7 @@ static void peer_in(struct peer *peer, const u8 *msg)
47914820 handle_peer_add_htlc (peer , msg );
47924821 return ;
47934822 case WIRE_START_BATCH :
4823+ handle_peer_start_batch (peer , msg );
47944824 return ;
47954825 case WIRE_COMMITMENT_SIGNED :
47964826 handle_peer_commit_sig_batch (peer , msg , 0 ,
0 commit comments