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

Function psbt_set_channel_ids

common/psbt_open.c:237–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237void psbt_set_channel_ids(struct wally_psbt *psbt,
238 struct channel_id *channel_ids)
239{
240 BUILD_ASSERT(sizeof(channel_ids[0].id) == 32);
241 int data_size = tal_count(channel_ids) * 32;
242 u8 *data = tal_arr(tmpctx, u8, data_size);
243
244 for (size_t i = 0; i < tal_count(channel_ids); i++)
245 memcpy(data + i * 32, channel_ids[i].id, 32);
246
247 psbt_set_lightning(psbt,
248 &psbt->unknowns,
249 PSBT_TYPE_CHANNELIDS,
250 data,
251 data_size);
252}
253
254/* psbt_set_channel_ids - Stores the channel_ids in the PSBT
255 *

Callers 1

signpsbt_get_resultFunction · 0.85

Calls 1

psbt_set_lightningFunction · 0.85

Tested by

no test coverage detected