aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODSPieter Wuille2014-09-021-2/+2
|
* Merge pull request #4737Pieter Wuille2014-09-011-4/+6
|\ | | | | | | | | | | | | 31e9a83 Use CSizeComputer to avoid counting sizes in SerializationOp (Pieter Wuille) 84881f8 rework overhauled serialization methods to non-static (Kamil Domanski) 5d96b4a remove fields of ser_streamplaceholder (Kamil Domanski) 3d796f8 overhaul serialization code (Kamil Domanski)
| * Use CSizeComputer to avoid counting sizes in SerializationOpPieter Wuille2014-08-311-5/+2
| |
| * rework overhauled serialization methods to non-staticKamil Domanski2014-08-311-7/+7
| | | | | | | | | | | | | | Thanks to Pieter Wuille for most of the work on this commit. I did not fixup the overhaul commit, because a rebase conflicted with "remove fields of ser_streamplaceholder". I prefer not to risk making a mistake while resolving it.
| * overhaul serialization codeKamil Domanski2014-08-311-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of each class' serialization/deserialization is no longer passed within a macro. The implementation now lies within a template of form: template <typename T, typename Stream, typename Operation> inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) { size_t nSerSize = 0; /* CODE */ return nSerSize; } In cases when codepath should depend on whether or not we are just deserializing (old fGetSize, fWrite, fRead flags) an additional clause can be used: bool fRead = boost::is_same<Operation, CSerActionUnserialize>(); The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize, Serialize and Unserialize. These are now wrappers around the "SerializationOp" template.
* | add missing header end commentsPhilip Kaufmann2014-08-281-2/+2
|/ | | | | | - ensures a consistent usage in header files - also add a blank line after the copyright header where missing - also remove orphan new-lines at the end of some files
* Break up CAddrMan's IMPLEMENT_SERIALIZEPieter Wuille2014-07-161-129/+131
|
* move rand functions from util to new random.h/.cppPhilip Kaufmann2014-07-091-0/+1
|
* add GetRandBytes() as wrapper for RAND_bytes()Philip Kaufmann2014-07-091-3/+1
| | | | | | - add a small wrapper in util around RAND_bytes() and replace with GetRandBytes() in the code to log errors from calling RAND_bytes() - remove OpenSSL header rand.h where no longer needed
* Move network-time related functions to timedata.cpp/hWladimir J. van der Laan2014-06-251-0/+1
| | | | | The network time-offset-mangement functions from util.cpp are moved to timedata.(cpp|h). This breaks the dependency of util on netbase.
* Remove redundant c_strR E Broadley2014-05-221-2/+2
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-16/+17
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* re-work -debug switch handlingPhilip Kaufmann2013-10-301-2/+2
| | | | | | | | | | | | - re-work -debug help message text - make -debug log every debugging information again (even all categories) - remove unneeded fDebug checks in front of LogPrint()/qDebug(), as that check is done in LogPrintf() when category is != NULL (true for all LogPrint() calls - remove fDebug ONLY in code which is NOT performance-critical - harmonize addrman category name - deprecate -debugnet usage, should be used via -debug=net and remove the corresponding global
* Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-3/+3
|
* Trim trailing whitespace for src/*.{h,cpp}Jeff Garzik2012-09-181-1/+1
|
* Bugfix: Correct English grammar regarding "'s"Luke Dashjr2012-08-011-4/+4
|
* Bugfix: Fix a variety of misspellingsLuke Dashjr2012-08-011-1/+1
|
* Fix a few typosfanquake2012-06-291-2/+2
|
* Update License in File HeadersFordy2012-05-181-1/+1
| | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* Split synchronization mechanisms from util.{h,cpp}Pieter Wuille2012-05-111-0/+1
|
* Clean up warningsPieter Wuille2012-05-091-1/+1
| | | | | | * Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters * Remove xCXXFLAGS usage in makefile.unix * Fix several recent and older sign-compare warnings
* Bugfix: store source address in addrmanPieter Wuille2012-05-051-1/+1
|
* Use scoped locks instead of CRITICAL_BLOCKPieter Wuille2012-04-091-9/+11
|
* Begin doxygen-compatible commentsPieter Wuille2012-03-261-1/+2
|
* CAddrMan: stochastic address managerPieter Wuille2012-02-241-0/+499
Design goals: * Only keep a limited number of addresses around, so that addr.dat does not grow without bound. * Keep the address tables in-memory, and occasionally write the table to addr.dat. * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. See comments in addrman.h for more detailed information.