Replace several network protocol version numbers with named constants

stored in version.h.

Also, a minor CAddress code reformat while we're in there, fixing
some incorrect indentation.
This commit is contained in:
Jeff Garzik
2012-04-12 20:07:49 -04:00
committed by Jeff Garzik
parent b87c0fc440
commit 8b09cd3a4d
4 changed files with 23 additions and 10 deletions

View File

@@ -79,9 +79,10 @@ class CAddress : public CService
if (fRead)
pthis->Init();
if (nType & SER_DISK)
READWRITE(nVersion);
if ((nType & SER_DISK) || (nVersion >= 31402 && !(nType & SER_GETHASH)))
READWRITE(nTime);
READWRITE(nVersion);
if ((nType & SER_DISK) ||
(nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
READWRITE(nTime);
READWRITE(nServices);
READWRITE(*pip);
)