Do any of these tx_parts spend this outpoint? If so, return it */
| 757 | |
| 758 | /* Do any of these tx_parts spend this outpoint? If so, return it */ |
| 759 | static const struct wally_tx_input * |
| 760 | which_input_spends(const struct tx_parts *tx_parts, |
| 761 | const struct bitcoin_outpoint *outpoint) |
| 762 | { |
| 763 | for (size_t i = 0; i < tal_count(tx_parts->inputs); i++) { |
| 764 | struct bitcoin_outpoint o; |
| 765 | if (!tx_parts->inputs[i]) |
| 766 | continue; |
| 767 | wally_tx_input_get_outpoint(tx_parts->inputs[i], &o); |
| 768 | if (!bitcoin_outpoint_eq(&o, outpoint)) |
| 769 | continue; |
| 770 | return tx_parts->inputs[i]; |
| 771 | } |
| 772 | return NULL; |
| 773 | } |
| 774 | |
| 775 | /* Does this tx input's witness match the witness we expected? */ |
| 776 | static bool onchain_witness_element_matches(const struct onchain_witness_element **welements, |
no test coverage detected