aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
AgeCommit message (Collapse)Author
2012-01-03Fix issue #659, and cleanup wallet/command-line argument handling a bitGavin Andresen
2011-12-21Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan
This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
2011-12-20Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr
2011-12-20Merge pull request #673 from mndrix/less-time-dataGavin Andresen
Store fewer time samples
2011-12-19Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
2011-12-19Implement BIP 14 : separate protocol version from client versionGavin Andresen
2011-12-01Retain only the most recent time samplesMichael Hendricks
Remembering all time samples makes nTimeOffset slow to respond to system clock corrections. For instance, I start my node with a system clock that's 30 minutes slow and run it for a few days. During that time, I accumulate 10,000 offset samples with a median of 1800 seconds. Now I correct my system clock. Without this change, my node must collect another 10,000 samples before nTimeOffset is correct again. With this change, I must only accumulate 100 samples to correct the offset. Storing unlimited time samples also allows an attacker with many IP addresses (ex, a large botnet) to perform a memory exhaustion attack against Bitcoin nodes. The attacker sends a version message from each IP to his target, consuming more of the target's memory each time. Time samples are small, so this attack might be impractical under the old code, but it's impossible with the new code.
2011-12-01Only log time samples in debug modeMichael Hendricks
The full list of time samples is rarely useful outside of debugging. The node's time offset, however is useful for discovering local clock drift, so it's displayed in all logging modes.
2011-10-07Fix build on windows and macGavin Andresen
Replaced all occurrences of #if* __WXMSW__ with WIN32, and all occurrences of __WXMAC_OSX__ with MAC_OSX, and made sure those are defined appropriately in the makefile and bitcoin-qt.pro.
2011-10-01remove possibility of 63 bit overflow in ParseMoneyWladimir J. van der Laan
- also, add unit tests for various functions in util.cpp/util.h
2011-09-27Inline base64 encoder/decoderPieter Wuille
This replaces the openssl-based base64 encoder and decoder with a more efficient internal one. Tested against the rfc4648 test vectors. Decoder is based on JoelKatz' version.
2011-09-27Faster Base64 decoder.JoelKatz
2011-09-26Remove wxWidgetsGavin Andresen
Makefiles now build bitcoind only. qmake/make in top-level directory is used to build Bitcoin QT Deleted almost all #ifdef GUI from the code (left one possibly controversial one) Deleted xpm/ files.
2011-09-26Merge pull request #517 from gavinandresen/DoSpreventionGavin Andresen
Denial-of-service prevention
2011-09-21SetMockTime() for cleaner unit testingGavin Andresen
2011-09-03Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-09-02If compiled -DDEBUG_LOCKORDER and run with -debug, print out every mutex ↵Gavin Andresen
lock/unlock (helpful for debugging something-is-holding-a-mutex-too-long problems)
2011-09-02Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
Conflicts: src/main.cpp
2011-08-31Highlight mis-matching locksGavin Andresen
2011-08-22Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-08-17Compile with DEBUG_LOCKORDER to detect inconsistent lock orderings that can ↵Gavin Andresen
cause deadlocks
2011-08-16Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-08-09Unify copyright notices.Matt Corallo
To a variation on: // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers
2011-07-15Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-07-13fix warnings: using the result of an assignment as a condition without ↵Giel van Schijndel
parentheses [-Wparentheses] Don't unnecessarily assign to variables within the *boolean* expression of a conditional. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-07Sync to bitcoin git e94010b2395694d56dd6Wladimir J. van der Laan
2011-07-04Do not use comma as thousands separatorGavin Andresen
Using the comma as thousands separator causes problems for parts of the world where comma == decimal point. Germans sending 0,001 bitcoins are unpleasantly surprised when that results in 1 BTC getting sent.
2011-06-26update core to d0d80170a2ca73004e08fb85007fe055cbf4e411 (CWallet class)Wladimir J. van der Laan
2011-06-20fixes for mac buildmark
2011-06-19Fix missing includes needed for Boost 1.46.Shane Wegner
2011-06-18update bitcoin core from git (eeac8727bc0a951631bd)Wladimir J. van der Laan
2011-06-14Merge pull request #226 from jordanlewis/betterheadersJeff Garzik
Optimize header dependencies; improve Makefile dependency graph
2011-06-14FormatFullVersion: build fix related to recent translation improvementJeff Garzik
2011-06-13Internationalization -- initial step, make _ return a std::string to prevent ↵Wladimir J. van der Laan
memory leaks
2011-06-12Double check translation and improved a translation stringHan Lin Yap
2011-06-11move back to original directory structureWladimir J. van der Laan
2011-05-26Fixes #240 and #244 - delete delete[] mismatch.Matt Corallo
2011-05-17Only include certain boost headers if necessary.Jordan Lewis
2011-05-15Only include strlcpy.h when we have toJordan Lewis
2011-05-15make bitcoin include files more modularWladimir J. van der Laan
2011-04-23directory re-organization (keeps the old build system)Jaromil
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