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

Function clone_output

bitcoin/tx_parts.c:51–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51static struct wally_tx_output *clone_output(const struct wally_tx_output *src)
52{
53 struct wally_tx_output *out;
54 int ret;
55
56 if (is_elements(chainparams)) {
57 ret = wally_tx_elements_output_init_alloc
58 (src->script, src->script_len,
59 src->asset, src->asset_len,
60 src->value, src->value_len,
61 src->nonce, src->nonce_len,
62 src->surjectionproof, src->surjectionproof_len,
63 src->rangeproof, src->rangeproof_len,
64 &out);
65 } else {
66 ret = wally_tx_output_init_alloc(src->satoshi,
67 src->script, src->script_len,
68 &out);
69 }
70 assert(ret == WALLY_OK);
71
72 tal_add_destructor(out, destroy_wally_tx_output);
73 return out;
74}
75
76struct tx_parts *tx_parts_from_wally_tx(const tal_t *ctx,
77 const struct wally_tx *wtx,

Callers 1

tx_parts_from_wally_txFunction · 0.85

Calls 1

is_elementsFunction · 0.85

Tested by

no test coverage detected