Add PSBTInput::GetOutPoint

Helper for getting the PSBTInput COutPoint
This commit is contained in:
Andrew Chow 2021-01-11 17:48:30 -05:00
parent 4ff2593280
commit d8dba3333b
2 changed files with 6 additions and 0 deletions

View file

@ -185,6 +185,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

@ -197,6 +197,7 @@ struct PSBTInput
void FromSignatureData(const SignatureData& sigdata);
void Merge(const PSBTInput& input);
bool GetUTXO(CTxOut& utxo) const;
COutPoint GetOutPoint() const;
PSBTInput(uint32_t version) : m_psbt_version(version) {}
template <typename Stream>