Changeset View
Changeset View
Standalone View
Standalone View
src/psbt.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
bool PartiallySignedTransaction::AddOutput(const CTxOut &txout, | bool PartiallySignedTransaction::AddOutput(const CTxOut &txout, | ||||
const PSBTOutput &psbtout) { | const PSBTOutput &psbtout) { | ||||
tx->vout.push_back(txout); | tx->vout.push_back(txout); | ||||
outputs.push_back(psbtout); | outputs.push_back(psbtout); | ||||
return true; | return true; | ||||
} | } | ||||
bool PartiallySignedTransaction::GetInputUTXO(CTxOut &utxo, | |||||
int input_index) const { | |||||
PSBTInput input = inputs[input_index]; | |||||
if (!input.utxo.IsNull()) { | |||||
utxo = input.utxo; | |||||
} else { | |||||
return false; | |||||
} | |||||
return true; | |||||
} | |||||
bool PSBTInput::IsNull() const { | bool PSBTInput::IsNull() const { | ||||
return utxo.IsNull() && partial_sigs.empty() && unknown.empty() && | return utxo.IsNull() && partial_sigs.empty() && unknown.empty() && | ||||
hd_keypaths.empty() && redeem_script.empty(); | hd_keypaths.empty() && redeem_script.empty(); | ||||
} | } | ||||
void PSBTInput::FillSignatureData(SignatureData &sigdata) const { | void PSBTInput::FillSignatureData(SignatureData &sigdata) const { | ||||
if (!final_script_sig.empty()) { | if (!final_script_sig.empty()) { | ||||
sigdata.scriptSig = final_script_sig; | sigdata.scriptSig = final_script_sig; | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |