| 11 | } |
| 12 | |
| 13 | static struct wally_tx_input *clone_input(const struct wally_tx_input *src) |
| 14 | { |
| 15 | struct wally_tx_input *in; |
| 16 | int ret; |
| 17 | |
| 18 | if (is_elements(chainparams)) { |
| 19 | ret = wally_tx_elements_input_init_alloc |
| 20 | (src->txhash, sizeof(src->txhash), |
| 21 | src->index, src->sequence, |
| 22 | src->script, src->script_len, |
| 23 | src->witness, |
| 24 | src->blinding_nonce, sizeof(src->blinding_nonce), |
| 25 | src->entropy, sizeof(src->entropy), |
| 26 | src->issuance_amount, src->issuance_amount_len, |
| 27 | src->inflation_keys, src->inflation_keys_len, |
| 28 | src->issuance_amount_rangeproof, |
| 29 | src->issuance_amount_rangeproof_len, |
| 30 | src->inflation_keys_rangeproof, |
| 31 | src->inflation_keys_rangeproof_len, |
| 32 | src->pegin_witness, |
| 33 | &in); |
| 34 | } else { |
| 35 | ret = wally_tx_input_init_alloc(src->txhash, sizeof(src->txhash), |
| 36 | src->index, src->sequence, |
| 37 | src->script, src->script_len, |
| 38 | src->witness, &in); |
| 39 | } |
| 40 | assert(ret == WALLY_OK); |
| 41 | |
| 42 | tal_add_destructor(in, destroy_wally_tx_input); |
| 43 | return in; |
| 44 | } |
| 45 | |
| 46 | static void destroy_wally_tx_output(struct wally_tx_output *out) |
| 47 | { |
no test coverage detected