Our inputs carry witness_utxo. Peer inputs carry the prevtx in utxo. */
| 345 | |
| 346 | /* Our inputs carry witness_utxo. Peer inputs carry the prevtx in utxo. */ |
| 347 | static const u8 *spent_scriptpubkey(const struct wally_psbt_input *in, |
| 348 | size_t *script_len) |
| 349 | { |
| 350 | if (in->witness_utxo && in->witness_utxo->script) { |
| 351 | *script_len = in->witness_utxo->script_len; |
| 352 | return in->witness_utxo->script; |
| 353 | } |
| 354 | if (in->utxo && in->index < in->utxo->num_outputs |
| 355 | && in->utxo->outputs[in->index].script) { |
| 356 | *script_len = in->utxo->outputs[in->index].script_len; |
| 357 | return in->utxo->outputs[in->index].script; |
| 358 | } |
| 359 | *script_len = 0; |
| 360 | return NULL; |
| 361 | } |
| 362 | |
| 363 | const char *check_tx_signatures_witness(const tal_t *ctx, |
| 364 | const struct wally_psbt_input *in, |
no outgoing calls
no test coverage detected