diff options
Diffstat (limited to 'src/primitives/transaction.h')
-rw-r--r-- | src/primitives/transaction.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 976542cfae..bf86562886 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -197,13 +197,13 @@ static constexpr TransactionSerParams TX_NO_WITNESS{.allow_witness = false}; /** * Basic transaction serialization format: - * - int32_t nVersion + * - uint32_t version * - std::vector<CTxIn> vin * - std::vector<CTxOut> vout * - uint32_t nLockTime * * Extended transaction serialization format: - * - int32_t nVersion + * - uint32_t version * - unsigned char dummy = 0x00 * - unsigned char flags (!= 0) * - std::vector<CTxIn> vin @@ -217,7 +217,7 @@ void UnserializeTransaction(TxType& tx, Stream& s, const TransactionSerParams& p { const bool fAllowWitness = params.allow_witness; - s >> tx.nVersion; + s >> tx.version; unsigned char flags = 0; tx.vin.clear(); tx.vout.clear(); @@ -257,7 +257,7 @@ void SerializeTransaction(const TxType& tx, Stream& s, const TransactionSerParam { const bool fAllowWitness = params.allow_witness; - s << tx.nVersion; + s << tx.version; unsigned char flags = 0; // Consistency check if (fAllowWitness) { @@ -296,7 +296,7 @@ class CTransaction { public: // Default transaction version. - static const int32_t CURRENT_VERSION=2; + static const uint32_t CURRENT_VERSION{2}; // The local variables are made const to prevent unintended modification // without updating the cached hash value. However, CTransaction is not @@ -305,7 +305,7 @@ public: // structure, including the hash. const std::vector<CTxIn> vin; const std::vector<CTxOut> vout; - const int32_t nVersion; + const uint32_t version; const uint32_t nLockTime; private: @@ -378,7 +378,7 @@ struct CMutableTransaction { std::vector<CTxIn> vin; std::vector<CTxOut> vout; - int32_t nVersion; + uint32_t version; uint32_t nLockTime; explicit CMutableTransaction(); |