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

Function update_v2_channelid

connectd/multiplex.c:1133–1150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133static void update_v2_channelid(struct subd *subd, const u8 *accept_channel2)
1134{
1135 struct pubkey *acc_basepoint;
1136
1137 acc_basepoint = extract_revocation_basepoint(tmpctx, accept_channel2);
1138 if (!acc_basepoint) {
1139 status_peer_unusual(&subd->peer->id, "WARNING: accept_channel2 no revocation_basepoint?");
1140 return;
1141 }
1142 if (!subd->opener_revocation_basepoint) {
1143 status_peer_unusual(&subd->peer->id, "WARNING: accept_channel2 without open_channel2?");
1144 return;
1145 }
1146
1147 move_channel_id_to_temp(subd);
1148 derive_channel_id_v2(&subd->channel_id,
1149 subd->opener_revocation_basepoint, acc_basepoint);
1150}
1151
1152/* We maintain channel_id matching for subds by snooping: we set it manually
1153 * 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