MCPcopy Create free account
hub / github.com/ElementsProject/lightning / handle_peer_start_batch

Function handle_peer_start_batch

channeld/channeld.c:2480–2506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2478}
2479
2480static void handle_peer_start_batch(struct peer *peer, const u8 *msg)
2481{
2482 u16 batch_size;
2483 struct channel_id channel_id;
2484 struct tlv_start_batch_tlvs *tlvs;
2485 if (!fromwire_start_batch(tmpctx, msg, &channel_id, &batch_size, &tlvs))
2486 peer_failed_warn(peer->pps, &peer->channel_id,
2487 "Bad start_batch %s", tal_hex(msg, msg));
2488
2489 if (!tlvs || !tlvs->batch_info
2490 || *tlvs->batch_info != WIRE_COMMITMENT_SIGNED) {
2491 status_unusual("Ignoring Unrecognized start_batch message type"
2492 " %s, expected WIRE_COMMITMENT_SIGNED.",
2493 tlvs && tlvs->batch_info
2494 ? peer_wire_name(*tlvs->batch_info)
2495 : "N/A");
2496 return;
2497 }
2498
2499 handle_peer_commit_sig_batch(peer, peer_read(tmpctx, peer->pps),
2500 peer->channel->funding_pubkey[REMOTE],
2501 NULL, 0, 0,
2502 peer->next_index[LOCAL],
2503 &peer->next_local_per_commit,
2504 false,
2505 batch_size);
2506}
2507
2508
2509/* Pops the penalty base for the given commitnum from our internal list. There

Callers 1

peer_inFunction · 0.85

Calls 4

peer_failed_warnFunction · 0.85
tal_hexFunction · 0.85
peer_readFunction · 0.85

Tested by

no test coverage detected