aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move CAddrDB frrom db to netWladimir J. van der Laan2013-12-041-0/+100
| | | | | | | | | This was a leftover from the times in which peers.dat depended in BDB. Other functions in db.cpp still depend on BerkelyDB, to be able to compile without BDB this (small) functionality needs to be moved to another file.
* Store and use a sanitized subVerMike Hearn2013-11-261-1/+1
|
* Merge pull request #3257Wladimir J. van der Laan2013-11-201-3/+0
|\ | | | | | | 379778b core: remove includes in .cpp, if header is already in .h (Philip Kaufmann)
| * core: remove includes in .cpp, if header is already in .hPhilip Kaufmann2013-11-151-3/+0
| | | | | | | | | | - example: if util.h includes stdint.h, remove it from util.cpp, as util.h is the first header included in util.cpp
* | orphan spaces cleanup ;-)Philip Kaufmann2013-11-151-7/+7
|/
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-30/+32
| | | | | | | | | 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.
* process received messages one at a time without sleeping between messagesPatrick Strateman2013-11-031-2/+16
|
* -fuzzmessagestest=N : randomly corrupt 1-of-N sent messagesGavin Andresen2013-10-291-0/+35
| | | | | I needed this to test the new "reject" p2p message, but it should be generally useful for fuzz-testing network message handling code.
* Adding new "addrlocal" field to RPC getpeerinfo.Josh Lehan2013-10-211-0/+3
| | | | | | | The existing CNode::addrLocal member is revealed to the user, as an address string, similar to the existing "addr" field. Instead of showing garbage or empty string, it simply will not appear in the output if local address not known yet.
* Merge pull request #2840 from sipa/nosendlockGavin Andresen2013-10-201-1/+2
|\ | | | | Allow SendMessages to run partially without cs_main
| * Run node deletions outside of cs_vNodesPieter Wuille2013-10-151-1/+2
| |
* | Merge pull request #3119Pieter Wuille2013-10-201-1/+1
|\ \ | |/ |/| | | db0e8cc Bump Year Number to 2013 (super3)
| * Bump Year Number to 2013super32013-10-201-1/+1
| |
* | Merge pull request #2924 from sje397/TrafficGraphWladimir J. van der Laan2013-10-151-5/+32
|\ \ | | | | | | [QT] Add network traffic graph to debug window
| * | Add network traffic graphScott Ellis2013-10-141-5/+32
| | |
* | | Merge pull request #3077 from sipa/chainGavin Andresen2013-10-141-0/+4
|\ \ \ | |/ / |/| | Refactor/encapsulate chain globals into a CChain class
| * | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-0/+4
| |/
* / Added ping time measurement.Josh Lehan2013-10-041-0/+15
|/ | | | | | | New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers.
* Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-48/+47
|
* autotools: switch to autotools buildsystemCory Fields2013-09-051-0/+7
|
* Merge pull request #2618 from fcicq/solaris-supportJeff Garzik2013-08-241-0/+4
|\ | | | | Partial solaris support
| * Fix fcntl include in net.cpp & netbase.cppfcicq2013-07-171-0/+4
| |
* | Remove #define loop from util.hGavin Andresen2013-07-311-6/+6
| | | | | | | | | | Replace the loop macro with while (true). The #define caused problems for Qt.
* | fix invalid conversion error with MinGW 4.8.1 in net.cppPhilip Kaufmann2013-07-131-0/+4
|/ | | | | | - fixes src\net.cpp:1601: Error:invalid conversion from 'void*' to 'const char*' [-fpermissive] in a setsockopt() call on Win32 that was found by using MinGW 4.8.1 compiler suite
* Dump addresses every 15 minutes instead of 10 secondsPieter Wuille2013-06-241-1/+4
|
* Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-191-130/+20
| | | | | | | | | | | | | The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
* send tx relay flag with versionbitsofproof2013-06-111-1/+1
|
* changes to thread code (directly use boost::thread)Philip Kaufmann2013-06-101-7/+4
| | | | | | | - removes our NewThread() function an replaces remaining calls with boost::thread with our TraceThread template - remove ExitThread() function - fix THREAD_PRIORITY_ABOVE_NORMAL for non Windows OSes
* Removed the main.h include from net.cpp.Eric Lombrozo2013-06-061-7/+1
|
* Using boost::signals2 to message main from net.cpp.Eric Lombrozo2013-06-051-24/+6
|
* Removed net.cpp's dependency on init.h.Eric Lombrozo2013-06-051-3/+25
| | | | | | | | | | Added explicit include of main.h in init.cpp, changed include of init.h to include of main.h in net.cpp. Added function registration for net.cpp in init.cpp's network initialization. Removed protocol.cpp's dependency on main.h. TODO: Remove main.h include in net.cpp.
* Moved unrelated-to-network calls in StartNode and StopNode into init.cppEric Lombrozo2013-06-051-1/+0
|
* Moved PushGetBlocks to main.cpp to eliminate dependence of net.cpp on ↵Eric Lombrozo2013-06-051-11/+0
| | | | CBlockLocator.
* Do not kill connections on recv buffer overflowPieter Wuille2013-05-011-15/+30
| | | | | | | | Instead of killing a connection when the receive buffer overflows, just temporarily halt receiving before that happens. Also, no matter what, always allow at least one full message in the receive buffer (otherwise blocks larger than the configured buffer size would pause indefinitely).
* Try to increase file descriptor rlimit if necessaryPieter Wuille2013-04-291-2/+3
| | | | As the default can be too low, especially on OSX.
* move WSAStartup to initWladimir J. van der Laan2013-04-281-12/+0
| | | | | | | WSAStartup should be called before using any other socket functions. BindListenPort is not called if not listening. Closes #2585.
* Merge pull request #2461 from sipa/syncnodeGavin Andresen2013-04-091-7/+57
|\ | | | | Make sure we always have a node to do IBD from
| * Add bytessent, bytesrecv and syncnode to getpeerinfoPieter Wuille2013-04-071-0/+5
| |
| * Make sure we always have a node to do IBD fromPieter Wuille2013-04-071-7/+52
| | | | | | | | | | | | | | | | | | This introduces the concept of the 'sync node', which is the one we asked for missing blocks. In case the sync node goes away, a new one will be selected. For now, the heuristic is very simple, but it can easily be extended later to add better policies.
* | net.cpp: Do not change primary process name from (default) to "bitcoin-start"Jeff Garzik2013-04-081-3/+0
| | | | | | | | Discussed a bit on IRC.
* | Merge pull request #2419 from sipa/noreltimePieter Wuille2013-04-081-11/+3
|\ \ | |/ |/| Drop release times for CNode
| * Drop release times for CNodePieter Wuille2013-04-041-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems there were two mechanisms for assessing whether a CNode was still in use: a refcount and a release timestamp. The latter seems to have been there for a long time, as a safety mechanism. However, this timer also keeps CNode objects alive for far longer than necessary after disconnects, potentially opening up a DoS window. This commit removes the timestamp-based mechanism, and replaces it with an assert(nRefCount >= 0), to verify that the refcounting is indeed correctly working.
* | small indentation, space, formatting fixes (no code changes)Philip Kaufmann2013-04-061-14/+10
|/
* Merge pull request #2423 from TheBlueMatt/limitedmapalreadyaskedforGavin Andresen2013-04-031-1/+1
|\ | | | | Limited mapAlreadyAskedFor
| * Move mapAlreadyAskedFor to limitedmapMatt Corallo2013-04-011-1/+1
| | | | | | | | | | | | This will result in re-requesting invs if we are under heavy inv load, however as long as we get no more than 16,000 invs in two minutes, this should have no effect on runtime behavior.
* | Clean up shutdown processGavin Andresen2013-04-031-25/+10
| |
* | Port Thread* methods to boost::thread_groupGavin Andresen2013-04-031-297/+57
| |
* | Rename util.h Sleep --> MilliSleepGavin Andresen2013-04-031-17/+17
| | | | | | | | | | | | | | | | Two reasons for this change: 1. Need to always use boost::thread's sleep, even on Windows, so the sleeps can be interrupted (prior code used Windows' built-in Sleep). 2. I always forgot what units the old Sleep took.
* | Shutdown cleanup prep-workGavin Andresen2013-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | Create a boost::thread_group object at the qt/bitcoind main-loop level that will hold pointers to all the main-loop threads. This will replace the vnThreadsRunning[] array. For testing, ported the BitcoinMiner threads to use its own boost::thread_group.
* | Merge pull request #2420 from sipa/globcleanGavin Andresen2013-04-021-2/+15
|\ \ | | | | | | Global cleanups