Add PSBTInput::GetOutPoint

Helper for getting the PSBTInput COutPoint
This commit is contained in:
Ava Chow 2024-07-22 17:14:27 -04:00
parent f7d9a086fe
commit 0cfc3ed8ad
2 changed files with 6 additions and 0 deletions

View file

@ -195,6 +195,11 @@ bool PSBTInput::GetUTXO(CTxOut& utxo) const
return true;
}
COutPoint PSBTInput::GetOutPoint() const
{
return COutPoint(prev_txid, *prev_out);
}
bool PSBTInput::IsNull() const
{
return !non_witness_utxo && witness_utxo.IsNull() && partial_sigs.empty() && unknown.empty() && hd_keypaths.empty() && redeem_script.empty() && witness_script.empty();

View file

@ -308,6 +308,7 @@ struct PSBTInput
* @return Whether the UTXO could be retrieved
*/
bool GetUTXO(CTxOut& utxo) const;
COutPoint GetOutPoint() const;
PSBTInput(uint32_t psbt_version) : m_psbt_version(psbt_version) {}
template <typename Stream>