Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 445 Lines • ▼ Show 20 Lines | public: | ||||
* CWallet::ComputeTimeSmart(). | * CWallet::ComputeTimeSmart(). | ||||
*/ | */ | ||||
unsigned int nTimeSmart; | unsigned int nTimeSmart; | ||||
/** | /** | ||||
* From me flag is set to 1 for transactions that were created by the wallet | * From me flag is set to 1 for transactions that were created by the wallet | ||||
* on this bitcoin node, and set to 0 for transactions that were created | * on this bitcoin node, and set to 0 for transactions that were created | ||||
* externally and came in through the network or sendrawtransaction RPC. | * externally and came in through the network or sendrawtransaction RPC. | ||||
*/ | */ | ||||
char fFromMe; | bool fFromMe; | ||||
//! position in ordered transaction list | //! position in ordered transaction list | ||||
int64_t nOrderPos; | int64_t nOrderPos; | ||||
std::multimap<int64_t, CWalletTx *>::const_iterator m_it_wtxOrdered; | std::multimap<int64_t, CWalletTx *>::const_iterator m_it_wtxOrdered; | ||||
// memory only | // memory only | ||||
enum AmountType { | enum AmountType { | ||||
DEBIT, | DEBIT, | ||||
CREDIT, | CREDIT, | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | template <typename Stream> void Serialize(Stream &s) const { | ||||
mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart); | mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart); | ||||
} | } | ||||
//! Used to be vMerkleBranch | //! Used to be vMerkleBranch | ||||
std::vector<char> dummy_vector1; | std::vector<char> dummy_vector1; | ||||
//! Used to be vtxPrev | //! Used to be vtxPrev | ||||
std::vector<char> dummy_vector2; | std::vector<char> dummy_vector2; | ||||
//! Used to be fSpent | //! Used to be fSpent | ||||
char dummy_char = false; | bool dummy_bool = false; | ||||
s << tx << hashBlock << dummy_vector1 << nIndex << dummy_vector2 | s << tx << hashBlock << dummy_vector1 << nIndex << dummy_vector2 | ||||
<< mapValueCopy << vOrderForm << fTimeReceivedIsTxTime | << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime | ||||
<< nTimeReceived << fFromMe << dummy_char; | << nTimeReceived << fFromMe << dummy_bool; | ||||
} | } | ||||
template <typename Stream> void Unserialize(Stream &s) { | template <typename Stream> void Unserialize(Stream &s) { | ||||
Init(nullptr); | Init(nullptr); | ||||
//! Used to be vMerkleBranch | //! Used to be vMerkleBranch | ||||
std::vector<uint256> dummy_vector1; | std::vector<uint256> dummy_vector1; | ||||
//! Used to be vtxPrev | //! Used to be vtxPrev | ||||
std::vector<CMerkleTx> dummy_vector2; | std::vector<CMerkleTx> dummy_vector2; | ||||
//! Used to be fSpent | //! Used to be fSpent | ||||
char dummy_char; | bool dummy_bool; | ||||
s >> tx >> hashBlock >> dummy_vector1 >> nIndex >> dummy_vector2 >> | s >> tx >> hashBlock >> dummy_vector1 >> nIndex >> dummy_vector2 >> | ||||
mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> | mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> | ||||
fFromMe >> dummy_char; | fFromMe >> dummy_bool; | ||||
ReadOrderPos(nOrderPos, mapValue); | ReadOrderPos(nOrderPos, mapValue); | ||||
nTimeSmart = mapValue.count("timesmart") | nTimeSmart = mapValue.count("timesmart") | ||||
? (unsigned int)atoi64(mapValue["timesmart"]) | ? (unsigned int)atoi64(mapValue["timesmart"]) | ||||
: 0; | : 0; | ||||
mapValue.erase("fromaccount"); | mapValue.erase("fromaccount"); | ||||
mapValue.erase("spent"); | mapValue.erase("spent"); | ||||
▲ Show 20 Lines • Show All 1,141 Lines • Show Last 20 Lines |