| 226 | } |
| 227 | |
| 228 | bool bitcoin_tx_check(const struct bitcoin_tx *tx) |
| 229 | { |
| 230 | u8 *newtx; |
| 231 | size_t written; |
| 232 | int flags = WALLY_TX_FLAG_USE_WITNESS; |
| 233 | |
| 234 | if (wally_tx_get_length(tx->wtx, flags, &written) != WALLY_OK) |
| 235 | return false; |
| 236 | |
| 237 | newtx = tal_arr(tmpctx, u8, written); |
| 238 | if (wally_tx_to_bytes(tx->wtx, flags, newtx, written, &written) != |
| 239 | WALLY_OK) |
| 240 | return false; |
| 241 | |
| 242 | if (written != tal_bytelen(newtx)) |
| 243 | return false; |
| 244 | |
| 245 | tal_free(newtx); |
| 246 | return true; |
| 247 | } |
| 248 | |
| 249 | void bitcoin_tx_output_set_amount(struct bitcoin_tx *tx, int outnum, |
| 250 | struct amount_sat amount) |
no test coverage detected