Commit Graph

161 Commits

Author SHA1 Message Date
Jeff Garzik 2fd6f067db Merge pull request #1777 from laanwj/2012_09_eliminate_sprintf
Remove last occurrence of potentially insecure function sprintf
2012-09-04 09:00:02 -07:00
Wladimir J. van der Laan 9c80909452 Remove last occurrence of potentially insecure function sprintf.
%d can return up to 11 characters. Move away from fixed buffer completely and
use our own safe function strprintf.
2012-09-03 16:18:16 +02:00
Wladimir J. van der Laan 4d1d94c56c Rename CreateThread to NewThread
Prevent clash with win32 API symbol
2012-08-29 20:25:37 +02:00
Pieter Wuille af4da4be3d Bugfix: increase score, not port 2012-08-29 02:33:25 +02:00
Pieter Wuille f161a2c211 Fix infinite loops in connection logic 2012-08-22 13:35:33 +02:00
Jeff Garzik f81e6f779b Merge pull request #1632 from luke-jr/spelling
Fix spelling and grammar errors
2012-08-01 10:56:47 -07:00
Luke Dashjr 814efd6f1f Bugfix: Fix a variety of misspellings 2012-08-01 17:49:51 +00:00
Philip Kaufmann e6bc9c35f3 Update Warning-strings to use a standard-format
- ensure warnings always start with "Warning:" and that the first
  character after ":" is written uppercase
- ensure the first sentence in warnings ends with an "!"
- remove unneeded spaces from Warning-strings
- add missing Warning-string translation
- remove a "\n" and replace with untranslatable "<br><br>"
2012-08-01 19:33:32 +02:00
Jeff Garzik 0ecbd46fe7 Merge pull request #1343 from rebroad/MisbehavingDelta
Show when node is misbehaving, not just at the point that it gets banned...
2012-08-01 09:06:57 -07:00
Philip Kaufmann a76552ce47 do not use external IPv4 discovery, when -onlynet="IPv6" 2012-07-20 13:23:02 +02:00
Philip Kaufmann c95d9a9482 fix a comment in net.cpp 2012-07-17 09:53:53 +02:00
Giel van Schijndel 9f46ab62b1 Fix thread names after review
* Fix wrong thread name for wallet *relocking* thread
  - Was named the unlocking thread
 * Use consistent naming

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-17 01:50:35 +02: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
Gregory Maxwell ff20f32338 Reorder dnsseed list, Jeff's seed list is static so put it last.
Because new nodes pull from the first connected node the load
balancing of the first connection is more important than it should
be. This change puts Pieter's seed first, because its probably
the best maintained right now.
2012-07-11 10:55:30 -04:00
Jeff Garzik 3898609304 Merge pull request #1546 from gmaxwell/allowsamenetinbound
Do not consider inbound peers for outbound network group exclusion.
2012-07-03 19:51:08 -07:00
R E Broadley 90c838da9f Show when node is misbehaving, not just at the point that it gets banned. 2012-07-02 21:58:47 +01:00
Gregory Maxwell 19521acfa4 Do not consider inbound peers for outbound network group exclusion.
Bitcoin will not make an outbound connection to a network group
(/16 for IPv4) that it is already connected to. This means that
if an attacker wants good odds of capturing all a nodes outbound
connections he must have hosts on a a large number of distinct
groups.

Previously both inbound and outbound connections were used to
feed this exclusion. The use of inbound connections, which can be
controlled by the attacker, actually has the potential of making
sibyl attacks _easier_: An attacker can start up hosts in groups
which house many honest nodes and make outbound connections to
the victim to exclude big swaths of honest nodes. Because the
attacker chooses to make the outbound connection he can always
beat out honest nodes for the consumption of inbound slots.

At _best_ the old behavior increases attacker costs by a single
group (e.g. one distinct group to use to fill up all your inbound
slots), but at worst it allows the attacker to select whole
networks you won't connect to.

This commit makes the nodes use only outbound links to exclude
network groups for outbound connections. Fancier things could
be done, like weaker exclusion for inbound groups... but
simplicity is good and I don't believe more complexity is
currently needed.
2012-07-01 20:42:47 -04:00
Matt Corallo 3c3cb60a90 Remove useless high-volume printf (fixes #1544). 2012-07-01 04:13:00 +02:00
Jeff Garzik 1006f0707e RPC: add 'getpeerinfo', returning easy-to-retrieve per-CNode data 2012-06-29 17:24:53 -04:00
Matt Corallo 9d6cd04b3b Stop processing messages on full send buffer and dont disconnect.
Also decrease default send/receive buffer sizes from 10 to 5 mb
as this patch makes it easy for a node to fill both instead of
only send.
2012-06-27 15:31:34 +02:00
Pieter Wuille 863e995b79 Debug version messages 2012-06-23 01:11:38 +02:00
Pieter Wuille 54ce3bad64 Add -tor and related configuration 2012-06-23 01:11:38 +02:00
Philip Kaufmann 9247134eab introduce a new StartShutdown() function, which starts a thread with Shutdown() if no GUI is used and calls uiInterface.QueueShutdown() if a GUI is used / all direct uiInterface.QueueShutdown() calls are replaced with Shutdown() - this ensures a clean GUI shutdown, even when catching a SIGTERM and allows the BitcoinGUI destructor to get called (which fixes a tray-icon issue and keeps the tray-icon until Bitcoin-Qt exits) 2012-06-12 07:21:03 +02:00
Pieter Wuille 587f929c64 Rework network config settings 2012-05-31 18:12:35 +02:00
Gregory Maxwell 7a99821377 Merge pull request #1342 from rebroad/LastSeenMinusMinus
Should not be T minus, as this indicate duration to future event.
2012-05-22 20:33:35 -07:00
Pieter Wuille 46784d0826 Merge pull request #1354 from fanquake/master
Update Header Licenses
2012-05-20 12:27:50 -07:00
Wladimir J. van der Laan ab1b288fa7 Convert UI interface to boost::signals2.
- Signals now go directly from the core to WalletModel/ClientModel.
  - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet.
- Gets rid of noui.cpp, the few lines that were left are merged into init.cpp
- Rename wxXXX message flags to MF_XXX, to make them UI indifferent.
- ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
2012-05-20 10:44:50 +02:00
Wladimir J. van der Laan fe4a655042 Fine-grained UI updates
Gets rid of `MainFrameRepaint` in favor of specific update functions that tell the UI exactly what changed.

This improves the efficiency of various handlers. Also fixes problems with mined transactions not showing up until restart.

The following notifications were added:

- `NotifyBlocksChanged`: Block chain changed
- `NotifyKeyStoreStatusChanged`: Wallet status (encrypted, locked) changed.
- `NotifyAddressBookChanged`: Address book entry changed.
- `NotifyTransactionChanged`: Wallet transaction added, removed or updated.
- `NotifyNumConnectionsChanged`: Number of connections changed.
- `NotifyAlertChanged`: New, updated or cancelled alert. As this finally makes it possible for the UI to know when a new alert arrived, it can be shown as OS notification.

These notifications could also be useful for RPC clients. However, currently, they are ignored in bitcoind (in noui.cpp).

Also brings back polling with timer for numBlocks in ClientModel. This value updates so frequently during initial download that the number of signals clogs the UI thread and causes heavy CPU usage. And after initial block download, the value changes so rarely that a delay of half a second until the UI updates is unnoticable.
2012-05-20 10:41:54 +02:00
Wladimir J. van der Laan 563f3efda3 Merge pull request #1323 from Diapolo/string_fixes
translation updates / string updates
2012-05-20 01:34:06 -07: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 83e047eaa7 Was showing a negative number. Changes to positive, since negative (T minus) usually indicates a future event. 2012-05-17 21:58:05 +01:00
Jeff Garzik 7563424f32 Merge pull request #1334 from rebroad/Exiting2Exited
Corrected grammar. As per Principle Of Least Surprise.
2012-05-17 11:29:09 -07:00
R E Broadley 1d764d631f Corrected grammar. As per Principle Of Least Surprise. 2012-05-17 18:52:38 +01:00
Philip Kaufmann 8b4d653663 allow translation of "options" used in the --help message / split translation of RPC console welcome message and remove the need to take care of "<br>" / remove some spaces in strings and misc other stuff related to translations 2012-05-17 15:49:00 +02:00
Jeff Garzik 928d3a011c CAddrDB: Replace BDB-managed addr.dat with internally managed peers.dat 2012-05-16 22:11:19 -04:00
Gregory Maxwell 20f19893cb Merge pull request #1262 from Diapolo/no_double_timestamps
no more double timestamps in debug.log
2012-05-14 18:59:28 -07:00
Pieter Wuille 0f1707de67 -onlynet instead of -blocknet 2012-05-14 17:52:45 +02:00
Pieter Wuille 09b4e26a44 Really do not consider blocked networks local 2012-05-13 23:50:55 +02:00
Pieter Wuille 1653f97c8f Do not consider blocked networks local 2012-05-13 15:11:51 +02:00
Philip Kaufmann 0985816bf6 ensure that no double timestamps show up in the debug.log, by removing manual timestamps from the source (now only -logtimestamps parameter adds timestamps to debug.log) 2012-05-13 14:36:35 +02:00
Pieter Wuille af4006b3f5 Enforce -nodiscover better 2012-05-13 14:22:15 +02:00
Jeff Garzik 80af836ce0 Merge pull request #1277 from Diapolo/IPv6_IPv4_strings
use "IPv6" and "IPv4" in strings as these are the official spellings
2012-05-12 18:59:31 -07:00
Pieter Wuille 5a3cb32e59 Take -port into account when resolving -bind's 2012-05-13 01:26:14 +02:00
Philip Kaufmann ea933b03b4 use "IPv6" and "IPv4" in strings as these are the official spellings and make ParseNetwork() in netbase.cpp case-insensitive 2012-05-13 01:12:24 +02:00
Pieter Wuille 139d2f7c29 Keep local service information per address
Keep local service information per CNetAddr instead of per CService,
but move the port into the information kept on it.
2012-05-13 01:03:05 +02:00
Pieter Wuille 89b5616d10 Do not signal outbound semaphore if uninitialized 2012-05-13 00:49:12 +02:00
Pieter Wuille a3878873f3 Merge pull request #1021 from sipa/ipv6
IPv6 node support
2012-05-11 18:23:56 -07:00
Gregory Maxwell c05271901a Merge pull request #1260 from sipa/splitsync
Split synchronization mechanisms from util.{h,cpp}
2012-05-11 18:05:49 -07:00
Jeff Garzik b34c5f3c0f Merge pull request #1101 from jgarzik/http11
Multithreaded JSON-RPC with HTTP 1.1 Keep-Alive support
2012-05-11 09:57:08 -07:00
Pieter Wuille c59abe2589 Use semaphores instead of condition variables 2012-05-11 17:02:11 +02:00