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

Function update_v2_channelid

connectd/multiplex.c:902–919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900}
901
902static void update_v2_channelid(struct subd *subd, const u8 *accept_channel2)
903{
904 struct pubkey *acc_basepoint;
905
906 acc_basepoint = extract_revocation_basepoint(tmpctx, accept_channel2);
907 if (!acc_basepoint) {
908 status_peer_unusual(&subd->peer->id, "WARNING: accept_channel2 no revocation_basepoint?");
909 return;
910 }
911 if (!subd->opener_revocation_basepoint) {
912 status_peer_unusual(&subd->peer->id, "WARNING: accept_channel2 without open_channel2?");
913 return;
914 }
915
916 move_channel_id_to_temp(subd);
917 derive_channel_id_v2(&subd->channel_id,
918 subd->opener_revocation_basepoint, acc_basepoint);
919}
920
921/* We maintain channel_id matching for subds by snooping: we set it manually
922 * for first packet (open_channel or open_channel2). */

Callers 1

maybe_update_channelidFunction · 0.85

Calls 3

move_channel_id_to_tempFunction · 0.85
derive_channel_id_v2Function · 0.85

Tested by

no test coverage detected