Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | inline void SerializationOp(Stream &s, Operation ser_action) { | ||||
READWRITE(nTime); | READWRITE(nTime); | ||||
READWRITE(vchPubKey); | READWRITE(vchPubKey); | ||||
if (ser_action.ForRead()) { | if (ser_action.ForRead()) { | ||||
try { | try { | ||||
READWRITE(fInternal); | READWRITE(fInternal); | ||||
} catch (std::ios_base::failure &) { | } catch (std::ios_base::failure &) { | ||||
/** | /** | ||||
* flag as external address if we can't read the internal | * flag as external address if we can't read the internal | ||||
* boolean | * boolean (this will be the case for any wallet before the HD | ||||
* (this will be the case for any wallet before the HD chain | * chain split version) | ||||
* split version) | |||||
*/ | */ | ||||
fInternal = false; | fInternal = false; | ||||
} | } | ||||
} else { | } else { | ||||
READWRITE(fInternal); | READWRITE(fInternal); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
Show All 25 Lines | if (!mapValue.count("n")) { | ||||
return; | return; | ||||
} | } | ||||
nOrderPos = atoi64(mapValue["n"].c_str()); | nOrderPos = atoi64(mapValue["n"].c_str()); | ||||
} | } | ||||
static inline void WriteOrderPos(const int64_t &nOrderPos, | static inline void WriteOrderPos(const int64_t &nOrderPos, | ||||
mapValue_t &mapValue) { | mapValue_t &mapValue) { | ||||
if (nOrderPos == -1) return; | if (nOrderPos == -1) { | ||||
return; | |||||
} | |||||
mapValue["n"] = i64tostr(nOrderPos); | mapValue["n"] = i64tostr(nOrderPos); | ||||
} | } | ||||
struct COutputEntry { | struct COutputEntry { | ||||
CTxDestination destination; | CTxDestination destination; | ||||
Amount amount; | Amount amount; | ||||
int vout; | int vout; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,211 Lines • Show Last 20 Lines |