mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Use CSizeComputer to avoid counting sizes in SerializationOp
This commit is contained in:
committed by
Kamil Domanski
parent
84881f8c47
commit
31e9a8384a
@@ -49,14 +49,11 @@ public:
|
||||
IMPLEMENT_SERIALIZE;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
size_t nSerSize = 0;
|
||||
CAddress* pthis = (CAddress*)(this);
|
||||
READWRITE(*pthis);
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(*(CAddress*)this);
|
||||
READWRITE(source);
|
||||
READWRITE(nLastSuccess);
|
||||
READWRITE(nAttempts);
|
||||
return nSerSize;
|
||||
}
|
||||
|
||||
void Init()
|
||||
|
||||
Reference in New Issue
Block a user