Commit graph

31 commits

Author SHA1 Message Date
Gregory Maxwell
6a60c64c6b Don't retry a failing IRC nickname forever.
If our IRC nick is in use (because some other node thinks it has
the same address we think we have) don't fruitlessly try to reconnect
using that name forever. After three tries, give up and use a random
nick. Either we'll learn a new local address from IRC and switch
to that, or it was right and the other guy is advertising for us.

This avoids a pessimal case where a second testnet node behind
a nat is unable to get any peers because he can't get on IRC.
2012-08-28 22:04:38 -04:00
Gregory Maxwell
3595b18793 Don't force IRC off if not listening, do force it off if IPv4 is off.
Previously Bitcoin would refuse to use IRC if it was either not
accepting inbound connections or not making outbound. Instead this
changes it to not use IRC only if it's not doing either or if
IPv4 is off completely. If Bitcoin is not listening this will use
the default random nicks rather than the IP based ones.
2012-08-28 21:43:28 -04:00
Luke Dashjr
814efd6f1f Bugfix: Fix a variety of misspellings 2012-08-01 17:49:51 +00:00
Giel van Schijndel
96931d6f78 Give threads a recognisable name to aid in debugging
NOTE: These thread names are visible in gdb when using 'info threads'.
      Additionally both 'top' and 'ps' show these names *unless* told to
      display the command-line instead of task name.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-17 01:50:35 +02:00
Pieter Wuille
587f929c64 Rework network config settings 2012-05-31 18:12:35 +02:00
Gavin Andresen
feeb761ba0 Testnet, Mark III 2012-05-25 14:36:40 -04:00
Fordy
3a25a2b9b0 Update License in File Headers
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-18 22:02:28 +08:00
R E Broadley
1d764d631f Corrected grammar. As per Principle Of Least Surprise. 2012-05-17 18:52:38 +01:00
Pieter Wuille
8f737d28a6 Only encode IPv4 addresses in IRC nicks 2012-05-13 15:07:31 +02:00
Pieter Wuille
7fa4443f77 Keep port information for local addresses 2012-05-11 15:29:19 +02:00
Pieter Wuille
39857190de Support for multiple local addresses 2012-05-04 16:12:23 +02:00
Pieter Wuille
ed6d0b5f85 Remove headers.h 2012-04-17 20:00:55 +02:00
Jeff Garzik
ab9dc75a18 The string class returns string::npos, when find() fails.
Noticed when sign-comparison warnings were enabled.
2012-04-15 16:47:24 -04:00
Pieter Wuille
5fee401fe1 CAddrMan: stochastic address manager
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-24 13:41:04 +01:00
Pieter Wuille
a3342d096f Fix #626: RecvLine wrong error message
Also moved RecvLine to net.cpp.
2012-02-19 19:06:42 +01:00
Gavin Andresen
882164196e Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
Gavin Andresen
9d952d17bb Look for flushwallet/listen/irc/dnsseed/upnp instead of noflushwallet/etc. And switch default for irc to 0. 2012-02-07 09:14:31 -05:00
Pieter Wuille
67a42f929b Network stack refactor
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.
2012-01-06 18:55:37 +01:00
Gavin Andresen
0fcf91ea1e Fix issue #659, and cleanup wallet/command-line argument handling a bit 2012-01-03 10:17:28 -05:00
Wladimir J. van der Laan
bde280b9a4 Revert "Use standard C99 (and Qt) types for 64-bit integers"
This reverts commit 21d9f36781.
2011-12-21 22:33:19 +01:00
Luke Dashjr
21d9f36781 Use standard C99 (and Qt) types for 64-bit integers 2011-12-20 16:52:59 -05:00
Matt Corallo
b2120e223a Unify copyright notices.
To a variation on:
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2011 The Bitcoin developers
2011-08-09 13:32:52 +02:00
Jeff Garzik
19ea44208f Merge pull request #226 from jordanlewis/betterheaders
Optimize header dependencies; improve Makefile dependency graph
2011-06-14 02:05:57 -07:00
Jeff Garzik
69a27a4ec6 irc: #bitcoin is overflowing. split up into 100 randomly-joined channels.
From laszlo
2011-05-20 20:54:51 -04:00
Pieter Wuille
b201c1f600 Bugfix for dnslookup: irc.cpp still used old CAddress constructor 2011-05-17 17:54:06 +02:00
Jordan Lewis
fdd7d04744 Only include strlcpy.h when we have to 2011-05-15 22:23:42 -05:00
Jordan Lewis
40c2614ef4 Only include net.h when we have to 2011-05-15 22:19:17 -05:00
Jordan Lewis
f23f9a03c8 Only include irc.h when needed 2011-05-15 22:19:16 -05:00
Wladimir J. van der Laan
223b6f1ba4 make bitcoin include files more modular 2011-05-15 12:04:20 +02:00
Pieter Wuille
a6a5bb7c20 Support for name lookups in -connect and -addnode
* A new option -dns is introduced that enables name lookups in
  -connect and -addnode, which is not enabled by default,
  as it may be considered a security issue.
* A Lookup function is added that supports retrieving one or
  more addresses based on a host name
* CAddress constructors (optionally) support name lookups.
* The different places in the source code that did name lookups
  are refactored to use NameLookup or CAddress instead (dns seeding,
  irc server lookup, getexternalip, ...).
* Removed ToStringLog() from CAddress, and switched to ToString(),
  since it was empty.
2011-05-10 23:49:30 +02:00
Jaromil
84c3fb07b0 directory re-organization (keeps the old build system)
there is no internal modification of any file in this commit

files are moved into directories according to established standards in
sourcecode distribution; these directories contain:

 src - Files that are used in constructing the executable binaries,
       but are not installed.

 doc - Files in HTML and text format that document usage, quirks of
       the implementation, and contributor checklists.

 locale - Files that contain human language translation of strings
          used in the program

 contrib - Files contributed from distributions or other third party
 	   implementing scripts and auxiliary programs
2011-04-23 12:10:25 +02:00
Renamed from irc.cpp (Browse further)