@@ -63,8 +63,8 @@ std::string CTxOut::ToString() const
6363 return strprintf (" CTxOut(nValue=%d.%08d, scriptPubKey=%s)" , nValue / COIN, nValue % COIN, HexStr (scriptPubKey).substr (0 , 30 ));
6464}
6565
66- CMutableTransaction::CMutableTransaction () : nVersion( CTransaction::CURRENT_VERSION) , nLockTime( 0 ) {}
67- CMutableTransaction::CMutableTransaction (const CTransaction& tx) : vin(tx.vin), vout(tx.vout), nVersion( tx.nVersion) , nLockTime( tx.nLockTime) {}
66+ CMutableTransaction::CMutableTransaction () : nVersion{ CTransaction::CURRENT_VERSION} , nLockTime{ 0 } {}
67+ CMutableTransaction::CMutableTransaction (const CTransaction& tx) : vin(tx.vin), vout(tx.vout), nVersion{ tx.nVersion } , nLockTime{ tx.nLockTime } {}
6868
6969Txid CMutableTransaction::GetHash () const
7070{
@@ -92,8 +92,8 @@ Wtxid CTransaction::ComputeWitnessHash() const
9292 return Wtxid::FromUint256 ((HashWriter{} << TX_WITH_WITNESS (*this )).GetHash ());
9393}
9494
95- CTransaction::CTransaction (const CMutableTransaction& tx) : vin(tx.vin), vout(tx.vout), nVersion( tx.nVersion) , nLockTime( tx.nLockTime) , m_has_witness{ComputeHasWitness ()}, hash{ComputeHash ()}, m_witness_hash{ComputeWitnessHash ()} {}
96- CTransaction::CTransaction (CMutableTransaction&& tx) : vin(std::move(tx.vin)), vout(std::move(tx.vout)), nVersion( tx.nVersion) , nLockTime( tx.nLockTime) , m_has_witness{ComputeHasWitness ()}, hash{ComputeHash ()}, m_witness_hash{ComputeWitnessHash ()} {}
95+ CTransaction::CTransaction (const CMutableTransaction& tx) : vin(tx.vin), vout(tx.vout), nVersion{ tx.nVersion } , nLockTime{ tx.nLockTime } , m_has_witness{ComputeHasWitness ()}, hash{ComputeHash ()}, m_witness_hash{ComputeWitnessHash ()} {}
96+ CTransaction::CTransaction (CMutableTransaction&& tx) : vin(std::move(tx.vin)), vout(std::move(tx.vout)), nVersion{ tx.nVersion } , nLockTime{ tx.nLockTime } , m_has_witness{ComputeHasWitness ()}, hash{ComputeHash ()}, m_witness_hash{ComputeWitnessHash ()} {}
9797
9898CAmount CTransaction::GetValueOut () const
9999{
@@ -115,7 +115,7 @@ unsigned int CTransaction::GetTotalSize() const
115115std::string CTransaction::ToString () const
116116{
117117 std::string str;
118- str += strprintf (" CTransaction(hash=%s, ver=%d , vin.size=%u, vout.size=%u, nLockTime=%u)\n " ,
118+ str += strprintf (" CTransaction(hash=%s, ver=%u , vin.size=%u, vout.size=%u, nLockTime=%u)\n " ,
119119 GetHash ().ToString ().substr (0 ,10 ),
120120 nVersion,
121121 vin.size (),
0 commit comments