MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetUTXO

Method GetUTXO

src/psbt.cpp:317–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317bool PSBTInput::GetUTXO(CTxOut& utxo) const
318{
319 if (non_witness_utxo) {
320 if (*prev_out >= non_witness_utxo->vout.size()) {
321 return false;
322 }
323 utxo = non_witness_utxo->vout[*prev_out];
324 } else if (!witness_utxo.IsNull()) {
325 utxo = witness_utxo;
326 } else if (m_peg_in_value && !m_peg_in_claim_script.empty()) {
327 // For Peg-ins, get the UTXO from the peg-in stuff
328 utxo = CTxOut(Params().GetConsensus().pegged_asset, CConfidentialValue(*m_peg_in_value), m_peg_in_claim_script);
329 } else {
330 return false;
331 }
332 return true;
333}
334
335COutPoint PSBTInput::GetOutPoint() const
336{

Callers 6

VerifyBlindProofsFunction · 0.80
BlindPSBTFunction · 0.80
PrecomputePSBTDataFunction · 0.80
SignPSBTMethod · 0.80
FUZZ_TARGET_INITFunction · 0.80
AnalyzePSBTFunction · 0.80

Calls 6

CConfidentialValueClass · 0.85
ParamsClass · 0.70
CTxOutClass · 0.50
sizeMethod · 0.45
IsNullMethod · 0.45
emptyMethod · 0.45

Tested by 1

FUZZ_TARGET_INITFunction · 0.64