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

Function psbt_has_input

bitcoin/psbt.c:418–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418bool psbt_has_input(const struct wally_psbt *psbt,
419 const struct bitcoin_outpoint *outpoint)
420{
421 for (size_t i = 0; i < psbt->num_inputs; i++) {
422 struct bitcoin_txid in_txid;
423 struct wally_tx_input *in = &psbt->tx->inputs[i];
424
425 if (outpoint->n != in->index)
426 continue;
427
428 wally_tx_input_get_txid(in, &in_txid);
429 if (bitcoin_txid_eq(&outpoint->txid, &in_txid))
430 return true;
431 }
432 return false;
433}
434
435struct amount_sat psbt_input_get_amount(const struct wally_psbt *psbt,
436 size_t in)

Callers 2

handle_validate_rbfFunction · 0.85
run_tx_interactiveFunction · 0.85

Calls 1

wally_tx_input_get_txidFunction · 0.85

Tested by

no test coverage detected