aboutsummaryrefslogtreecommitdiff
path: root/src/psbt.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-06-04 23:43:43 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-06-24 16:32:19 -0400
commit46004790588c24174a0bec49b540d158ce163ffd (patch)
tree091d77316fac2460d14b81580c9ce387fd77f2ac /src/psbt.h
parent5279d8bc07d601fe6a67ad665fbc7591fe73c7de (diff)
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.
Diffstat (limited to 'src/psbt.h')
-rw-r--r--src/psbt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/psbt.h b/src/psbt.h
index 401889e2fe..0951b76f83 100644
--- a/src/psbt.h
+++ b/src/psbt.h
@@ -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);
}