mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Serializer simplifications after IMPLEMENT_SERIALIZE overhaul
This commit is contained in:
@@ -89,16 +89,13 @@ class CAddress : public CService
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
bool fRead = ser_action.ForRead();
|
||||
|
||||
CAddress* pthis = const_cast<CAddress*>(this);
|
||||
if (fRead)
|
||||
pthis->Init();
|
||||
if (ser_action.ForRead())
|
||||
Init();
|
||||
if (nType & SER_DISK)
|
||||
READWRITE(nVersion);
|
||||
if ((nType & SER_DISK) ||
|
||||
(nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
|
||||
READWRITE(nTime);
|
||||
READWRITE(nTime);
|
||||
READWRITE(nServices);
|
||||
READWRITE(*(CService*)this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user