|
|
@ -110,7 +110,7 @@ std::string CTxOut::ToString() const |
|
|
|
} |
|
|
|
|
|
|
|
CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {} |
|
|
|
CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime), vpour(tx.vpour) {} |
|
|
|
CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime), vpour(tx.vpour), joinSplitPubKey(tx.joinSplitPubKey), joinSplitSig(tx.joinSplitSig) {} |
|
|
|
|
|
|
|
uint256 CMutableTransaction::GetHash() const |
|
|
|
{ |
|
|
@ -122,9 +122,9 @@ void CTransaction::UpdateHash() const |
|
|
|
*const_cast<uint256*>(&hash) = SerializeHash(*this); |
|
|
|
} |
|
|
|
|
|
|
|
CTransaction::CTransaction() : nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0), vpour() { } |
|
|
|
CTransaction::CTransaction() : nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0), vpour(), joinSplitPubKey(), joinSplitSig() { } |
|
|
|
|
|
|
|
CTransaction::CTransaction(const CMutableTransaction &tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime), vpour(tx.vpour) { |
|
|
|
CTransaction::CTransaction(const CMutableTransaction &tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime), vpour(tx.vpour), joinSplitPubKey(tx.joinSplitPubKey), joinSplitSig(tx.joinSplitSig) { |
|
|
|
UpdateHash(); |
|
|
|
} |
|
|
|
|
|
|
@ -134,6 +134,8 @@ CTransaction& CTransaction::operator=(const CTransaction &tx) { |
|
|
|
*const_cast<std::vector<CTxOut>*>(&vout) = tx.vout; |
|
|
|
*const_cast<unsigned int*>(&nLockTime) = tx.nLockTime; |
|
|
|
*const_cast<std::vector<CPourTx>*>(&vpour) = tx.vpour; |
|
|
|
*const_cast<CCompressedPubKey*>(&joinSplitPubKey) = tx.joinSplitPubKey; |
|
|
|
*const_cast<std::vector<unsigned char>*>(&joinSplitSig) = tx.joinSplitSig; |
|
|
|
*const_cast<uint256*>(&hash) = tx.hash; |
|
|
|
return *this; |
|
|
|
} |
|
|
|