Do any of these tx_parts spend this outpoint? If so, return it */
| 713 | |
| 714 | /* Do any of these tx_parts spend this outpoint? If so, return it */ |
| 715 | static const struct wally_tx_input * |
| 716 | which_input_spends(const struct tx_parts *tx_parts, |
| 717 | const struct bitcoin_outpoint *outpoint) |
| 718 | { |
| 719 | for (size_t i = 0; i < tal_count(tx_parts->inputs); i++) { |
| 720 | struct bitcoin_outpoint o; |
| 721 | if (!tx_parts->inputs[i]) |
| 722 | continue; |
| 723 | wally_tx_input_get_outpoint(tx_parts->inputs[i], &o); |
| 724 | if (!bitcoin_outpoint_eq(&o, outpoint)) |
| 725 | continue; |
| 726 | return tx_parts->inputs[i]; |
| 727 | } |
| 728 | return NULL; |
| 729 | } |
| 730 | |
| 731 | /* Does this tx input's witness match the witness we expected? */ |
| 732 | static bool onchain_witness_element_matches(const struct onchain_witness_element **welements, |
no test coverage detected