aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
AgeCommit message (Collapse)Author
2012-08-12Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/key.h src/keystore.h src/net.h src/protocol.cpp src/qt/guiutil.h src/test/DoS_tests.cpp
2012-08-12Bugfix: Fix a variety of misspellingsLuke Dashjr
2012-05-20Update License in File HeadersFordy
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.
2012-05-20Update License in File HeadersFordy
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.
2012-04-22Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/main.h src/net.cpp src/util.cpp
2012-04-22Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/main.cpp
2012-04-17CNode's nHeaderStart may be negative, so change its type (PARTIAL)Jeff Garzik
2012-03-26Begin doxygen-compatible commentsPieter Wuille
2012-03-22Merge branch 'addrman' of https://github.com/sipa/bitcoinGavin Andresen
2012-02-27Add mruset and use it for setInventoryKnownPieter Wuille
2012-02-24CAddrMan: stochastic address managerPieter Wuille
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.
2012-02-22Merge branch 'postfeb20' of https://github.com/sipa/bitcoinGavin Andresen
2012-02-21Post-feb20 simplificationsPieter Wuille
Now the entire network upgraded to (initial) protocol version 209, crtainl simplifications in the source code are possible.
2012-02-19Fix #626: RecvLine wrong error messagePieter Wuille
Also moved RecvLine to net.cpp.
2012-02-17Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-02-17Macros for manual critical sectionsPieter Wuille
2012-02-16Symbolic names for threadsPieter Wuille
Introduce an enum threadId, and use symbolic indices when accessing vnThreadsRunning.
2012-02-11Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-02-11Get ext. IP from UPnP, make sure addrMe IsRoutable() in version.Matt Corallo
This fixes a potential bug where some NATs may replace the node's interal IP with its external IP in version messages, causing incorrect checksums when version messages begin being checksummed on February 14, 2012.
2012-02-11Macros for manual critical sectionsPieter Wuille
2012-02-07Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
Conflicts: src/bitcoinrpc.cpp
2012-02-07Update copyrights to 2012 for files modified this yearLuke Dashjr
2012-02-07Update all copyrights to 2012Gavin Andresen
2012-01-16Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-01-16Code tidyups, fixing various warnings.Luke Dashjr
Partial cherry pick of: Compile with extra warnings turned on. And more makefile/code tidying up. This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings. Exceptions are: -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned. -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit). Conflicts: src/makefile.osx src/makefile.unix src/netbase.cpp src/rpc.cpp
2012-01-12Compile with extra warnings turned on. And more makefile/code tidying up.Gavin Andresen
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings. Exceptions are: -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned. -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
2012-01-06Network stack refactorPieter Wuille
This introduces CNetAddr and CService, respectively wrapping an (IPv6) IP address and an IP+port combination. This functionality used to be part of CAddress, which also contains network flags and connection attempt information. These extra fields are however not always necessary. These classes, along with logic for creating connections and doing name lookups, are moved to netbase.{h,cpp}, which does not depend on headers.h. Furthermore, CNetAddr is mostly IPv6-ready, though IPv6 functionality is not yet enabled for the application itself.
2011-12-21Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan
This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
2011-12-20Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr
2011-12-19Implement BIP 14 : separate protocol version from client versionGavin Andresen
2011-12-02Move DNS Seed lookup to a new thread.Matt Corallo
2011-12-02Move DNS Seed lookup to a new thread.Matt Corallo
2011-11-26Move DNS Seed lookup to a new thread.Matt Corallo
2011-10-07Fix build on windows and macGavin Andresen
Replaced all occurrences of #if* __WXMSW__ with WIN32, and all occurrences of __WXMAC_OSX__ with MAC_OSX, and made sure those are defined appropriately in the makefile and bitcoin-qt.pro.
2011-09-21Framework for banning mis-behaving peersGavin Andresen
2011-09-17missed printf in AbortMessage(); merged printfs in EndMessageNils Schneider
2011-09-17log low-level network messages only when fDebug is setNils Schneider
2011-08-19Move CInv to protocol.[ch]ppGiel van Schijndel
This commit does *not* and should not modify *any* code, it only moves it from net.h and splits it across protocol.cpp and protocol.hpp. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-08-19Move CAddress to protocol.[ch]ppGiel van Schijndel
This commit does *not* and should not modify *any* code, it only moves it from net.h and splits it across protocol.cpp and protocol.hpp. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-08-19Start moving protocol-specific code to protocol.[ch]ppGiel van Schijndel
Move CMessageHeader from net.h to protocol.[ch]pp, with the implementation in the .cpp compilation unit (compiling once is enough). This commit does *not* and should not modify *any* code, it only moves it from net.h and splits it across protocol.cpp and protocol.hpp. Indentation changes aside the closest thing to a modification of code is the addition of the 'TODO' comment (the execution of which requires code modifications and thus doesn't belong in this commit). Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-08-19Make some global variables less-global (static)Giel van Schijndel
Explicitly make these global variables less-global to reduce the maximum scope of this global state. In my experience global variables tend to be a major source of bugs. As such the less accessible they are the less likely they are to be the source of a bug. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-08-17Compile with DEBUG_LOCKORDER to detect inconsistent lock orderings that can ↵Gavin Andresen
cause deadlocks
2011-08-11Merge pull request #458 from TheBlueMatt/copyrightGavin Andresen
Unify copyright notices.
2011-08-10Merge pull request #459 from jgarzik/char-msgstartGavin Andresen
Use 'unsigned char' rather than 'char' for pchMessageStart.
2011-08-10Use 'unsigned char' rather than 'char' for pchMessageStart.Venkatesh Srinivas
Regarding https://bitcointalk.org/index.php?topic=28022.0 main.cpp has: "char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };" Per discussion on the thread linked, leaving the signedness of pchMessageStart is unsafe for values > 0x80. This patch specifies 'unsigned char' in main.cpp and net.h. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2011-08-09Unify copyright notices.Matt Corallo
To a variation on: // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers
2011-08-08Add missing includes to net.hVegard Nossum
2011-07-14Single DB transaction for all addresses in a messagePatrick Varilly
Cuts disk activity at startup immensely
2011-07-01Limit response to getblocks to half of output buffer sizePieter Wuille
Introduce SendBufferSize() and ReceiveBufferSize(), and limit the blocks sent as response to the "getblocks" message to half of the active send buffer size.
2011-06-12Faster timeout when connectingPieter Wuille
Use non-blocking connects, and a select() call to wait a predefined time (5s by default, but configurable with -timeout) for either success or failure. This allows much more connections to be tried per time unit. Based on a patch by phantomcircuit.