Page MenuHomePhabricator

D3700.id10362.diff
No OneTemporary

D3700.id10362.diff

diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -222,9 +222,9 @@
// actually immutable; deserialization and assignment are implemented,
// and bypass the constness. This is safe, as they update the entire
// structure, including the hash.
- const int32_t nVersion;
const std::vector<CTxIn> vin;
const std::vector<CTxOut> vout;
+ const int32_t nVersion;
const uint32_t nLockTime;
private:
@@ -298,9 +298,9 @@
*/
class CMutableTransaction {
public:
- int32_t nVersion;
std::vector<CTxIn> vin;
std::vector<CTxOut> vout;
+ int32_t nVersion;
uint32_t nLockTime;
CMutableTransaction();
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp
--- a/src/primitives/transaction.cpp
+++ b/src/primitives/transaction.cpp
@@ -38,7 +38,7 @@
CMutableTransaction::CMutableTransaction()
: nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}
CMutableTransaction::CMutableTransaction(const CTransaction &tx)
- : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout),
+ : vin(tx.vin), vout(tx.vout), nVersion(tx.nVersion),
nLockTime(tx.nLockTime) {}
static uint256 ComputeCMutableTransactionHash(const CMutableTransaction &tx) {
@@ -62,13 +62,13 @@
* TODO: remove the need for this default constructor entirely.
*/
CTransaction::CTransaction()
- : nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0),
+ : vin(), vout(), nVersion(CTransaction::CURRENT_VERSION), nLockTime(0),
hash() {}
CTransaction::CTransaction(const CMutableTransaction &tx)
- : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout),
+ : vin(tx.vin), vout(tx.vout), nVersion(tx.nVersion),
nLockTime(tx.nLockTime), hash(ComputeHash()) {}
CTransaction::CTransaction(CMutableTransaction &&tx)
- : nVersion(tx.nVersion), vin(std::move(tx.vin)), vout(std::move(tx.vout)),
+ : vin(std::move(tx.vin)), vout(std::move(tx.vout)), nVersion(tx.nVersion),
nLockTime(tx.nLockTime), hash(ComputeHash()) {}
Amount CTransaction::GetValueOut() const {

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 6, 17:16 (18 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5082765
Default Alt Text
D3700.id10362.diff (2 KB)

Event Timeline