MCPcopy Create free account
hub / github.com/ElementsProject/lightning / wally_tx_input_spends

Function wally_tx_input_spends

bitcoin/tx.c:764–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762}
763
764bool 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). */

Callers 2

output_spentFunction · 0.85
sign_our_inputsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected