aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Clarify the error message when unable to bind to portpaveljanik2014-03-051-1/+1
| |
* | Bitcoin is running fine...paveljanik2014-03-051-2/+2
|/ | | | | | | When bitcoind can't bind, bitcoin server (or Bitcoin Core Daemon) is probably already running. Add the missing word "server". Bitcoin itself is definitely running ;-) Add _(...) so the string can be localized. I apologize for such trivial changes, learning github interface.
* Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan2014-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h indirectly, so we cannot fix this with just macros. Trivial commit: apply the following script to all .cpp and .h files: # Middle sed -i 's/"PRIx64"/x/g' "$1" sed -i 's/"PRIu64"/u/g' "$1" sed -i 's/"PRId64"/d/g' "$1" # Initial sed -i 's/PRIx64"/"x/g' "$1" sed -i 's/PRIu64"/"u/g' "$1" sed -i 's/PRId64"/"d/g' "$1" # Trailing sed -i 's/"PRIx64/x"/g' "$1" sed -i 's/"PRIu64/u"/g' "$1" sed -i 's/"PRId64/d"/g' "$1" After this commit, `git grep` for PRI.64 should turn up nothing except the defines in util.h.
* Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | | | | | in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
* Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-22/+22
| | | | | | | After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
* Make bitcoin compile without wallet if "db_cxx.h" is not presentThomas Holenstein2013-12-191-1/+0
| | | | | Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove them.
* Merge pull request #3373Wladimir J. van der Laan2013-12-091-3/+3
|\ | | | | | | 80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
| * Add ThreadGetMyExternalIP to net thread groupGavin Andresen2013-12-091-3/+3
| | | | | | | | Fixes #3372 -- crash at shutdown.
* | Add main-specific node statePieter Wuille2013-12-081-22/+10
|/
* 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