mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
Add PSBTInput::GetOutPoint
Helper for getting the PSBTInput COutPoint
This commit is contained in:
parent
f7d9a086fe
commit
0cfc3ed8ad
2 changed files with 6 additions and 0 deletions
|
@ -195,6 +195,11 @@ bool PSBTInput::GetUTXO(CTxOut& utxo) const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
COutPoint PSBTInput::GetOutPoint() const
|
||||||
|
{
|
||||||
|
return COutPoint(prev_txid, *prev_out);
|
||||||
|
}
|
||||||
|
|
||||||
bool PSBTInput::IsNull() const
|
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();
|
return !non_witness_utxo && witness_utxo.IsNull() && partial_sigs.empty() && unknown.empty() && hd_keypaths.empty() && redeem_script.empty() && witness_script.empty();
|
||||||
|
|
|
@ -308,6 +308,7 @@ struct PSBTInput
|
||||||
* @return Whether the UTXO could be retrieved
|
* @return Whether the UTXO could be retrieved
|
||||||
*/
|
*/
|
||||||
bool GetUTXO(CTxOut& utxo) const;
|
bool GetUTXO(CTxOut& utxo) const;
|
||||||
|
COutPoint GetOutPoint() const;
|
||||||
PSBTInput(uint32_t psbt_version) : m_psbt_version(psbt_version) {}
|
PSBTInput(uint32_t psbt_version) : m_psbt_version(psbt_version) {}
|
||||||
|
|
||||||
template <typename Stream>
|
template <typename Stream>
|
||||||
|
|
Loading…
Add table
Reference in a new issue