aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
AgeCommit message (Collapse)Author
2014-06-12Merge pull request #2784Wladimir J. van der Laan
f1920e8 Ping automatically every 2 minutes (unconditionally) (Pieter Wuille)
2014-06-11Merge pull request #4227Wladimir J. van der Laan
634bd61 convert an if into an else if in OpenNetworkConnection() (Philip Kaufmann) 5bd6c31 small cleanup of net (Philip Kaufmann)
2014-06-11small cleanup of netPhilip Kaufmann
- remove an unneded else in ConnectNode() - make 0 a double and change to 0.0 in ConnectNode() - rename strDest to pszDest in OpenNetworkConnection() - remove an unneded call to our REF() macro in BindListenPort() - small style cleanups and removal of unneeded new-lines
2014-06-11[Qt] allow setting listen via GUIPhilip Kaufmann
- add DEFAULT_LISTEN in net.h and use in the code (shared setting between core and GUI) Important: This makes it obvious, that we need to re-think the settings/options handling, as GUI settings are processed before any parameter-interaction (which is mostly important for network stuff) in AppInit2()!
2014-06-09Ping automatically every 2 minutes (unconditionally)Pieter Wuille
... instead of after 30 minutes of no sending, for latency measurement and keep-alive. Also, disconnect if no reply arrives within 20 minutes, instead of 90 of inactivity (for peers supporting the 'pong' message).
2014-06-09Merge pull request #3824Wladimir J. van der Laan
f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon) 2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon) c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon) a3d946e Get rid of TestNet() (jtimon) 6fc0fa6 Add RPCisTestNet chain parameter (jtimon) cfeb823 Add RequireStandard chain parameter (jtimon) 21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon) d754f34 Move majority constants to chainparams (jtimon) 8d26721 Get rid of RegTest() (jtimon) cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon) 2595b9a Add DefaultMinerThreads chain parameter (jtimon) bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon) 1712adb Add MiningRequiresPeers chain parameter (jtimon)
2014-06-04Merge pull request #4247 from Diapolo/listenJeff Garzik
rename fNoListen to fListen and move to net
2014-06-04net.h was using std namespace through chainparams.h included in protocol.hjtimon
2014-05-30Limit number of known addresses per peerPieter Wuille
2014-05-29rename fNoListen to fListen and move to netPhilip Kaufmann
- better code readability and it belongs to net - this is a prerequisite for a pull to add -listen to the GUI
2014-05-29Merge pull request #4132Wladimir J. van der Laan
d4e1c61 add DEFAULT_UPNP constant in net (Philip Kaufmann)
2014-05-25Merge pull request #4206Wladimir J. van der Laan
79d06dc Remove redundant c_str (R E Broadley)
2014-05-22Remove redundant c_strR E Broadley
2014-05-20add DEFAULT_UPNP constant in netPhilip Kaufmann
- as this is a shared Core/GUI setting, this makes it easier to keep them in sync (also no new includes are needed)
2014-05-10Fix addnode "onetry": Connect with OpenNetworkConnectionCozz Lovan
2014-05-06rpc: add `getblockchaininfo` and `getnetworkinfo`Wladimir J. van der Laan
Adds two new info query commands that take over information from hodge-podge `getinfo`. Also some new information is added: - `getblockchaininfo` - `chain`: (string) current chain (main, testnet3, regtest) - `verificationprogress: (numeric) estimated verification progress - `chainwork` - `getnetworkinfo` - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)
2014-03-10Merge pull request #3514Wladimir J. van der Laan
f59d8f0 Per-peer block download tracking and stalled download detection. (Pieter Wuille)
2014-02-24Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan
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.
2014-02-22Don't use PRIx64 formatting derives from inttypes.hWladimir J. van der Laan
As the tinyformat-based formatting system (introduced in b77dfdc) is type-safe, no special format characters are needed to specify sizes. Tinyformat can support (ignore) the C99 prefixes such as "ll" but chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't include inttypes.h and define our own for compatibility. (an alternative would be to sweep the entire codebase using sed -i to get rid of the size specifiers but this has less diff impact)
2014-02-09Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron
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.
2014-02-08Per-peer block download tracking and stalled download detection.Pieter Wuille
Keep track of which block is being requested (and to be requested) from each peer, and limit the number of blocks in-flight per peer. In addition, detect stalled downloads, and disconnect if they persist for too long. This means blocks are never requested twice, and should eliminate duplicate downloads during synchronization.
2014-01-11small headers ordering cleanupPhilip Kaufmann
- keep headers in alphabetical order - fix Makefile.am (2 files in 1 line - leftover) - remove some spaces etc.
2013-12-08Add main-specific node statePieter Wuille
2013-12-04Move CAddrDB frrom db to netWladimir J. van der Laan
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.
2013-11-26Store and use a sanitized subVerMike Hearn
2013-11-11misc small changes to polish after include cleanupPhilip Kaufmann
2013-11-10Move CCoins-related logic to coins.{cpp.h}Pieter Wuille
2013-11-10Cleanup code using forward declarations.Brandon Dahler
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.
2013-11-08Merge pull request #3155 from wtogami/split_proto_varWladimir J. van der Laan
Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION
2013-10-29-fuzzmessagestest=N : randomly corrupt 1-of-N sent messagesGavin Andresen
I needed this to test the new "reject" p2p message, but it should be generally useful for fuzz-testing network message handling code.
2013-10-25Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSIONWarren Togami
INIT_PROTO_VERSION is the initial version, after a succesful version/verack it is increased to a negotiated version. MIN_PEER_PROTO_VERSION could be a different value to disconnect from peers older than a specified version.
2013-10-21Adding new "addrlocal" field to RPC getpeerinfo.Josh Lehan
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.
2013-10-20Merge pull request #3119Pieter Wuille
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20Bump Year Number to 2013super3
2013-10-15Merge pull request #2924 from sje397/TrafficGraphWladimir J. van der Laan
[QT] Add network traffic graph to debug window
2013-10-15misc spelling / space / style fixesPhilip Kaufmann
2013-10-14Merge pull request #3077 from sipa/chainGavin Andresen
Refactor/encapsulate chain globals into a CChain class
2013-10-14Add network traffic graphScott Ellis
2013-10-11Refactor/encapsulate chain globals into a CChain classPieter Wuille
2013-10-04Added ping time measurement.Josh Lehan
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.
2013-09-18Replace printf with LogPrintf / LogPrintGavin Andresen
2013-08-20Performance optimization for bloom filters.Gregory Maxwell
This reduces a peer's ability to attack network resources by using a full bloom filter, but without reducing the usability of bloom filters. It sets a default match everything filter for peers and it generalizes a prior optimization to cover more cases.
2013-06-06Removed the main.h include from net.cpp.Eric Lombrozo
2013-06-05Using boost::signals2 to message main from net.cpp.Eric Lombrozo
2013-06-05Removed net.cpp's dependency on init.h.Eric Lombrozo
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.
2013-06-05Moved PushGetBlocks to main.cpp to eliminate dependence of net.cpp on ↵Eric Lombrozo
CBlockLocator.
2013-04-30Don't announce to non-peer CNodesPieter Wuille
2013-04-29Try to increase file descriptor rlimit if necessaryPieter Wuille
As the default can be too low, especially on OSX.
2013-04-09Merge pull request #2461 from sipa/syncnodeGavin Andresen
Make sure we always have a node to do IBD from
2013-04-07Add bytessent, bytesrecv and syncnode to getpeerinfoPieter Wuille