MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetUTXO

Method GetUTXO

src/psbt.cpp:269–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269bool PSBTInput::GetUTXO(CTxOut& utxo) const
270{
271 if (non_witness_utxo) {
272 if (prev_out >= non_witness_utxo->vout.size()) {
273 return false;
274 }
275 if (non_witness_utxo->GetHash() != prev_txid) {
276 return false;
277 }
278 utxo = non_witness_utxo->vout[prev_out];
279 } else if (!witness_utxo.IsNull()) {
280 utxo = witness_utxo;
281 } else {
282 return false;
283 }
284 return true;
285}
286
287COutPoint PSBTInput::GetOutPoint() const
288{

Callers 3

PrecomputePSBTDataFunction · 0.80
FUZZ_TARGETFunction · 0.80
AnalyzePSBTFunction · 0.80

Calls 3

sizeMethod · 0.45
GetHashMethod · 0.45
IsNullMethod · 0.45

Tested by 1

FUZZ_TARGETFunction · 0.64