aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * IPv6 node supportPieter Wuille2012-05-111-19/+37
| | | | | | | | | | | | This will make bitcoin relay valid routable IPv6 addresses, and when USE_IPV6 is enabled, listen on IPv6 interfaces and attempt connections to IPv6 addresses.
* | Merge pull request #1260 from sipa/splitsyncGregory Maxwell2012-05-111-32/+34
|\ \ | | | | | | Split synchronization mechanisms from util.{h,cpp}
| * | Use semaphores instead of condition variablesPieter Wuille2012-05-111-32/+34
| |/
* | Merge pull request #1101 from jgarzik/http11Jeff Garzik2012-05-111-2/+3
|\ \ | |/ |/| Multithreaded JSON-RPC with HTTP 1.1 Keep-Alive support
| * Support multi-threaded JSON-RPCDavid Joel Schwartz2012-05-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | Change internal HTTP JSON-RPC server from single-threaded to thread-per-connection model. The IP filter list is applied prior to starting the thread, which then processes the RPC. A mutex covers the entire RPC operation, because not all RPC operations are thread-safe. [minor modifications by jgarzik, to make change upstream-ready]
* | fix an incorrect if-clause in net.cppPhilip Kaufmann2012-05-091-1/+1
|/
* Merge branch 'tmp-ipv6' into merge-ipv6Jeff Garzik2012-05-081-108/+238
|\
| * Added -externalip and -discoverPieter Wuille2012-05-041-22/+32
| | | | | | | | | | | | -externalip=<ip> can be used to explicitly set the public IP address of your node. -discover=0 can be used to disable the automatic public IP discovery system.
| * Support for multiple local addressesPieter Wuille2012-05-041-65/+124
| |
| * Add -seednode connections, and use this for -dnsseed + -proxydnsPieter Wuille2012-05-041-6/+33
| |
| * Support connecting by hostnames passed to proxy (-proxydns)Pieter Wuille2012-05-041-45/+79
| |
* | Merge pull request #1180 from jgarzik/sign-compareJeff Garzik2012-05-081-1/+1
|\ \ | |/ |/| Fix final sign comparison warnings
| * ThreadSocketHandler2(): cast to avoid signed/unsigned warningJeff Garzik2012-05-011-1/+1
| |
* | fix compiler warning "suggest explicit braces to avoid ambiguous "else"Philip Kaufmann2012-05-011-0/+4
|/ | | | [-Wparentheses]" in net.cpp
* Change signed->unsigned at 3 code sitesJeff Garzik2012-04-231-1/+1
| | | | This resolves signed/unsigned comparison warnings.
* Remove headers.hPieter Wuille2012-04-171-1/+1
|
* Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik2012-04-151-3/+3
| | | | | foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
* The string class returns string::npos, when find() fails.Jeff Garzik2012-04-151-2/+2
| | | | Noticed when sign-comparison warnings were enabled.
* fix warnings: unused variable 'XX' [-Wunused-variable]Wladimir J. van der Laan2012-04-151-3/+0
|
* Use scoped locks instead of CRITICAL_BLOCKPieter Wuille2012-04-091-36/+80
|
* Merge pull request #1033 from sipa/waitPieter Wuille2012-04-061-19/+22
|\ | | | | Condition variables instead of polling
| * Condition variable for outbound connection slotsPieter Wuille2012-04-041-19/+22
| | | | | | | | | | | | | | | | | | Keep a global counter for nOutbound, protected with its own waitable critical section, and wait when all outbound slots are filled, rather than polling. This removes the (on average) 1 second delay between a lost connection and a new connection attempt, and may speed up shutdowns.
* | Remove half-implemented publish/subscribe systemGavin Andresen2012-04-041-106/+0
|/
* Give DNS seeds a random age between 3 and 7 days oldPieter Wuille2012-03-251-1/+2
| | | | This speeds up initial connections with an old/large addr.dat a lot.
* Merge branch 'addrman' of https://github.com/sipa/bitcoinGavin Andresen2012-03-221-164/+86
|\
| * CAddrMan: stochastic address managerPieter Wuille2012-02-241-164/+86
| | | | | | | | | | | | | | | | | | 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.
* | When disconnecting a node, clear the received buffer so that we doAlistair Buxton2012-03-181-0/+1
| | | | | | | | | | | | | | not process any already received messages. The primary reason to do this is if a node spams hundreds of messages and we ban them, we don't want to continue processing the rest of it.
* | fix typo src/net.cppnomnombtc2012-03-051-1/+1
| |
* | bitcoind changes to stop storing settings in wallet.dat.Gavin Andresen2012-02-261-2/+10
|/
* Fix #626: RecvLine wrong error messagePieter Wuille2012-02-191-0/+51
| | | | Also moved RecvLine to net.cpp.
* Symbolic names for threadsPieter Wuille2012-02-161-54/+54
| | | | | Introduce an enum threadId, and use symbolic indices when accessing vnThreadsRunning.
* Merge pull request #844 from sipa/shutdownfixPieter Wuille2012-02-161-5/+8
|\ | | | | Several shutdown-related fixes
| * Several shutdown-related fixesPieter Wuille2012-02-151-5/+8
| | | | | | | | | | | | * do not let vnThreadsRunning[1] go negative * do not perform locking operations while vnThreadsRunning[1] is decreased * check vnThreadsRunning[1] at exit
* | Bugfix: do not create CAddress for invalid acceptsPieter Wuille2012-02-151-1/+5
|/
* Get ext. IP from UPnP, make sure addrMe IsRoutable() in version.Matt Corallo2012-02-101-1/+21
| | | | | | | 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.
* Update all copyrights to 2012Gavin Andresen2012-02-071-1/+1
|
* Look for flushwallet/listen/irc/dnsseed/upnp instead of noflushwallet/etc. ↵Gavin Andresen2012-02-071-2/+2
| | | | And switch default for irc to 0.
* Avoid advertising the node's address when it is not listening or ↵Gregory Maxwell2012-02-011-1/+1
| | | | | | | | | | | | | | | IsInitialBlockDownload(). This also avoids flushing setAddrKnown until 24 hours has passed, and avoids contacting the external IP services when not listening. Advertising non-listening nodes is just addr message spam. It doesn't help the network, in fact it hurts the network, and it also hurts user's privacy. Advertising far out of sync nodes doesn't help the network— they can't even forward (most) transactions and wastes nodes outbound slots.
* Fix UPnP by reannouncing every 20 minutes.Matt Corallo2012-01-311-2/+22
|
* Merge branch 'updateseednodes' of https://github.com/nanotube/bitcoinGavin Andresen2012-01-191-64/+77
|\
| * Update seednodes, pick long-uptime nodes with version >= 0.4.0Daniel Folkinshteyn2012-01-191-64/+77
| |
* | Merge branch 'tabs-to-space' of https://github.com/larsr/bitcoinGavin Andresen2012-01-191-2/+2
|\ \ | |/ |/|
| * Replace tabs with four spaces to comply with coding standard in doc/coding.txtLars Rasmusson2012-01-141-2/+2
| |
* | Fix handling of default portsPieter Wuille2012-01-171-6/+6
| |
* | Merge branch 'keepnode' of https://github.com/TheBlueMatt/bitcoinGavin Andresen2012-01-161-20/+83
|\ \ | |/ |/|
| * Minor code cleanup to use fHaveUPnP instead of #ifdefMatt Corallo2012-01-121-4/+2
| |
| * Add -keepnode which attempts to -addnode and keep a connection openMatt Corallo2012-01-121-18/+83
| |
* | Compile with extra warnings turned on. And more makefile/code tidying up.Gavin Andresen2012-01-121-3/+0
|/ | | | | | | 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).
* Network stack refactorPieter Wuille2012-01-061-258/+50
| | | | | | | | | | | | | | | 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.
* Fix issue #659, and cleanup wallet/command-line argument handling a bitGavin Andresen2012-01-031-1/+1
|