Changeset View
Changeset View
Standalone View
Standalone View
src/script/keyorigin.h
Show All 13 Lines | struct KeyOriginInfo { | ||||
std::vector<uint32_t> path; | std::vector<uint32_t> path; | ||||
friend bool operator==(const KeyOriginInfo &a, const KeyOriginInfo &b) { | friend bool operator==(const KeyOriginInfo &a, const KeyOriginInfo &b) { | ||||
return std::equal(std::begin(a.fingerprint), std::end(a.fingerprint), | return std::equal(std::begin(a.fingerprint), std::end(a.fingerprint), | ||||
std::begin(b.fingerprint)) && | std::begin(b.fingerprint)) && | ||||
a.path == b.path; | a.path == b.path; | ||||
} | } | ||||
ADD_SERIALIZE_METHODS; | SERIALIZE_METHODS(KeyOriginInfo, obj) { | ||||
template <typename Stream, typename Operation> | READWRITE(obj.fingerprint, obj.path); | ||||
inline void SerializationOp(Stream &s, Operation ser_action) { | |||||
READWRITE(fingerprint); | |||||
READWRITE(path); | |||||
} | } | ||||
void clear() { | void clear() { | ||||
memset(fingerprint, 0, 4); | memset(fingerprint, 0, 4); | ||||
path.clear(); | path.clear(); | ||||
} | } | ||||
}; | }; | ||||
#endif // BITCOIN_SCRIPT_KEYORIGIN_H | #endif // BITCOIN_SCRIPT_KEYORIGIN_H |