mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 19:21:28 +02:00
psbt: always put a non_witness_utxo and don't remove it
Offline signers will always need a non_witness_utxo so make sure it is there.
This commit is contained in:
@ -67,12 +67,12 @@ struct PSBTInput
|
||||
template <typename Stream>
|
||||
inline void Serialize(Stream& s) const {
|
||||
// Write the utxo
|
||||
// If there is a non-witness utxo, then don't add the witness one.
|
||||
if (non_witness_utxo) {
|
||||
SerializeToVector(s, PSBT_IN_NON_WITNESS_UTXO);
|
||||
OverrideStream<Stream> os(&s, s.GetType(), s.GetVersion() | SERIALIZE_TRANSACTION_NO_WITNESS);
|
||||
SerializeToVector(os, non_witness_utxo);
|
||||
} else if (!witness_utxo.IsNull()) {
|
||||
}
|
||||
if (!witness_utxo.IsNull()) {
|
||||
SerializeToVector(s, PSBT_IN_WITNESS_UTXO);
|
||||
SerializeToVector(s, witness_utxo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user