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

Function psbt_contribs_changed

common/psbt_open.c:560–576  ·  view source on GitHub ↗

FIXME: both PSBT should be const */

Source from the content-addressed store, hash-verified

558
559/* FIXME: both PSBT should be const */
560bool psbt_contribs_changed(struct wally_psbt *orig,
561 struct wally_psbt *new)
562{
563 struct psbt_changeset *cs;
564 bool ok;
565
566 assert(orig->version == 2 && new->version == 2);
567
568 cs = psbt_get_changeset(NULL, orig, new);
569
570 ok = tal_count(cs->added_ins) > 0 ||
571 tal_count(cs->rm_ins) > 0 ||
572 tal_count(cs->added_outs) > 0 ||
573 tal_count(cs->rm_outs) > 0;
574 tal_free(cs);
575 return ok;
576}

Callers 3

check_psbt_comparisonFunction · 0.85
splice_update_get_resultFunction · 0.85

Calls 2

psbt_get_changesetFunction · 0.85
tal_freeFunction · 0.85

Tested by 1

check_psbt_comparisonFunction · 0.68