Changeset View
Changeset View
Standalone View
Standalone View
src/primitives/transaction.cpp
Show All 40 Lines | |||||
} | } | ||||
CTxOut::CTxOut(const CAmount &nValueIn, CScript scriptPubKeyIn) { | CTxOut::CTxOut(const CAmount &nValueIn, CScript scriptPubKeyIn) { | ||||
nValue = nValueIn; | nValue = nValueIn; | ||||
scriptPubKey = scriptPubKeyIn; | scriptPubKey = scriptPubKeyIn; | ||||
} | } | ||||
std::string CTxOut::ToString() const { | std::string CTxOut::ToString() const { | ||||
return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, | return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", | ||||
nValue % COIN, HexStr(scriptPubKey).substr(0, 30)); | nValue / COIN.GetSatoshis(), nValue % COIN.GetSatoshis(), | ||||
HexStr(scriptPubKey).substr(0, 30)); | |||||
} | } | ||||
CMutableTransaction::CMutableTransaction() | CMutableTransaction::CMutableTransaction() | ||||
: nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {} | : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {} | ||||
CMutableTransaction::CMutableTransaction(const CTransaction &tx) | CMutableTransaction::CMutableTransaction(const CTransaction &tx) | ||||
: nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), | : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), | ||||
nLockTime(tx.nLockTime) {} | nLockTime(tx.nLockTime) {} | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |