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

Function tal_wally_end

common/utils.c:44–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void tal_wally_end(const tal_t *parent)
45{
46 tal_t *p;
47 if (!wally_tal_ctx) {
48 /* This makes valgrind show us backtraces! */
49 *(u8 *)wally_tal_ctx = '\0';
50 abort();
51 }
52 while ((p = tal_first(wally_tal_ctx)) != NULL) {
53 /* Refuse to make a loop!
54 * Did you mean to use tal_wally_end_onto? */
55 assert(p != parent);
56 /* Don't steal backtrace from wally_tal_ctx! */
57 if (tal_name(p) && streq(tal_name(p), "backtrace")) {
58 tal_free(p);
59 continue;
60 }
61 tal_steal(parent, p);
62 }
63 assert(tal_check(wally_tal_ctx, "tal_wally_end ctx check"));
64 wally_tal_ctx = tal_free(wally_tal_ctx);
65}
66
67void tal_wally_end_onto_(const tal_t *parent,
68 tal_t *from_wally,

Callers 15

create_hsmFunction · 0.85
sign_our_inputsFunction · 0.85
handle_sign_anchorspendFunction · 0.85
tx_parts_from_wally_txFunction · 0.85
bitcoin_tx_add_outputFunction · 0.85
bitcoin_tx_add_inputFunction · 0.85
bitcoin_tx_hash_for_sigFunction · 0.85
new_psbtFunction · 0.85
psbt_add_inputFunction · 0.85
psbt_append_inputFunction · 0.85

Calls 5

abortFunction · 0.85
tal_firstFunction · 0.85
tal_nameFunction · 0.85
tal_freeFunction · 0.85
tal_checkFunction · 0.85

Tested by 1

check_psbt_comparisonFunction · 0.68