diff --git a/src/psbt.cpp b/src/psbt.cpp index 1a49d01afcf..3f5e2cde9c2 100644 --- a/src/psbt.cpp +++ b/src/psbt.cpp @@ -16,6 +16,8 @@ using common::PSBTError; PartiallySignedTransaction::PartiallySignedTransaction(const CMutableTransaction& tx) : tx(tx) { + tx_version = tx.version; + fallback_locktime = tx.nLockTime; inputs.reserve(tx.vin.size()); for (const CTxIn& input : tx.vin) { inputs.emplace_back(GetVersion(), input.prevout.hash, input.prevout.n, input.nSequence); diff --git a/src/psbt.h b/src/psbt.h index 3d893194842..2325ca97be9 100644 --- a/src/psbt.h +++ b/src/psbt.h @@ -1073,6 +1073,9 @@ public: std::map, std::vector> unknown; std::set m_proprietary; + uint32_t tx_version; + std::optional fallback_locktime; + bool IsNull() const; uint32_t GetVersion() const; @@ -1203,6 +1206,8 @@ public: throw std::ios_base::failure("Unsigned tx does not have empty scriptSigs and scriptWitnesses."); } } + tx_version = tx->version; + fallback_locktime = tx->nLockTime; break; } case PSBT_GLOBAL_XPUB: