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

Function psbt_has_input

bitcoin/psbt.c:580–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580bool psbt_has_input(const struct wally_psbt *psbt,
581 const struct bitcoin_outpoint *outpoint)
582{
583 for (size_t i = 0; i < psbt->num_inputs; i++) {
584 struct bitcoin_txid in_txid;
585 const struct wally_psbt_input *in = &psbt->inputs[i];
586
587 if (outpoint->n != in->index)
588 continue;
589
590 wally_psbt_input_get_txid(in, &in_txid);
591 if (bitcoin_txid_eq(&outpoint->txid, &in_txid))
592 return true;
593 }
594 return false;
595}
596
597struct amount_sat psbt_input_get_amount(const struct wally_psbt *psbt,
598 size_t in)

Callers 4

handle_validate_rbfFunction · 0.85
get_changesFunction · 0.85
run_tx_interactiveFunction · 0.85

Calls 1

Tested by

no test coverage detected