| 762 | } |
| 763 | |
| 764 | bool wally_tx_input_spends(const struct wally_tx_input *input, |
| 765 | const struct bitcoin_outpoint *outpoint) |
| 766 | { |
| 767 | /* Useful, as tx_part can have some NULL inputs */ |
| 768 | if (!input) |
| 769 | return false; |
| 770 | BUILD_ASSERT(sizeof(outpoint->txid) == sizeof(input->txhash)); |
| 771 | if (memcmp(&outpoint->txid, input->txhash, sizeof(outpoint->txid)) != 0) |
| 772 | return false; |
| 773 | return input->index == outpoint->n; |
| 774 | } |
| 775 | |
| 776 | /* FIXME(cdecker) Make the caller pass in a reference to amount_asset, and |
| 777 | * return false if unintelligible/encrypted. (WARN UNUSED). */ |
no outgoing calls
no test coverage detected