| 247 | } |
| 248 | |
| 249 | void bitcoin_tx_output_set_amount(struct bitcoin_tx *tx, int outnum, |
| 250 | struct amount_sat amount) |
| 251 | { |
| 252 | u64 satoshis = amount.satoshis; /* Raw: low-level helper */ |
| 253 | struct wally_tx_output *output = &tx->wtx->outputs[outnum]; |
| 254 | assert(outnum < tx->wtx->num_outputs); |
| 255 | if (chainparams->is_elements) { |
| 256 | int ret = wally_tx_confidential_value_from_satoshi( |
| 257 | satoshis, output->value, output->value_len); |
| 258 | assert(ret == WALLY_OK); |
| 259 | } else { |
| 260 | output->satoshi = satoshis; |
| 261 | |
| 262 | /* update the global tx for the psbt also */ |
| 263 | output = &tx->psbt->tx->outputs[outnum]; |
| 264 | output->satoshi = satoshis; |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | const u8 *wally_tx_output_get_script(const tal_t *ctx, |
| 269 | const struct wally_tx_output *output) |
no outgoing calls
no test coverage detected