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

Function convert_from_legacy

plugins/chanbackup.c:311–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311static struct modern_scb_chan *convert_from_legacy(const tal_t *ctx, struct legacy_scb_chan *legacy_scb_chan) {
312 struct modern_scb_chan *modern_scb_tlv = tal(ctx, struct modern_scb_chan);
313 modern_scb_tlv->id = legacy_scb_chan->id;
314 modern_scb_tlv->addr = legacy_scb_chan->addr;
315 modern_scb_tlv->node_id = legacy_scb_chan->node_id;
316 modern_scb_tlv->cid = legacy_scb_chan->cid;
317 modern_scb_tlv->funding = legacy_scb_chan->funding;
318 modern_scb_tlv->funding_sats = legacy_scb_chan->funding_sats;
319 modern_scb_tlv->type = legacy_scb_chan->type;
320 modern_scb_tlv->tlvs = tlv_scb_tlvs_new(ctx);
321 return modern_scb_tlv;
322}
323
324/* Reads WIRE_STATIC_CHAN_BACKUP and converts from legacy_scb_chan to
325 * modern_scb_chan, if required. */

Callers 1

read_static_chan_backupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected