Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | template <typename Stream> void Serialize(Stream &s) const { | ||||
mapValue_t mapValueCopy = mapValue; | mapValue_t mapValueCopy = mapValue; | ||||
mapValueCopy["fromaccount"] = strFromAccount; | mapValueCopy["fromaccount"] = strFromAccount; | ||||
WriteOrderPos(nOrderPos, mapValueCopy); | WriteOrderPos(nOrderPos, mapValueCopy); | ||||
if (nTimeSmart) { | if (nTimeSmart) { | ||||
mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart); | mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart); | ||||
} | } | ||||
s << *static_cast<const CMerkleTx *>(this); | s << static_cast<const CMerkleTx &>(*this); | ||||
//!< Used to be vtxPrev | //!< Used to be vtxPrev | ||||
std::vector<CMerkleTx> vUnused; | std::vector<CMerkleTx> vUnused; | ||||
s << vUnused << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime | s << vUnused << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime | ||||
<< nTimeReceived << fFromMe << fSpent; | << nTimeReceived << fFromMe << fSpent; | ||||
} | } | ||||
template <typename Stream> void Unserialize(Stream &s) { | template <typename Stream> void Unserialize(Stream &s) { | ||||
Init(nullptr); | Init(nullptr); | ||||
char fSpent; | char fSpent; | ||||
s >> *static_cast<CMerkleTx *>(this); | s >> static_cast<CMerkleTx &>(*this); | ||||
//!< Used to be vtxPrev | //!< Used to be vtxPrev | ||||
std::vector<CMerkleTx> vUnused; | std::vector<CMerkleTx> vUnused; | ||||
s >> vUnused >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> | s >> vUnused >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> | ||||
nTimeReceived >> fFromMe >> fSpent; | nTimeReceived >> fFromMe >> fSpent; | ||||
strFromAccount = std::move(mapValue["fromaccount"]); | strFromAccount = std::move(mapValue["fromaccount"]); | ||||
ReadOrderPos(nOrderPos, mapValue); | ReadOrderPos(nOrderPos, mapValue); | ||||
nTimeSmart = mapValue.count("timesmart") | nTimeSmart = mapValue.count("timesmart") | ||||
▲ Show 20 Lines • Show All 894 Lines • Show Last 20 Lines |