aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace tabs with four spaces to comply with coding standard in doc/coding.txtLars Rasmusson2012-01-141-2/+2
|
* Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen2012-01-131-0/+1
|
* Network stack refactorPieter Wuille2012-01-061-27/+3
| | | | | | | | | | | | | | | 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-4/+21
|
* Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan2011-12-211-22/+23
| | | | This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
* Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr2011-12-201-23/+22
|
* Merge pull request #673 from mndrix/less-time-dataGavin Andresen2011-12-201-0/+10
|\ | | | | Store fewer time samples
| * Retain only the most recent time samplesMichael Hendricks2011-12-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen2011-12-191-5/+1
| |
* | Cleanup: removed dead code, and use C99 typedefs for int64 (supported by all ↵Gavin Andresen2011-12-191-21/+1
| | | | | | | | modern c++ compilers)
* | Merge pull request #707 from gavinandresen/BIP14Gavin Andresen2011-12-191-2/+2
|\ \ | | | | | | Implement BIP 14 : separate protocol version from client version
| * | Implement BIP 14 : separate protocol version from client versionGavin Andresen2011-12-191-2/+2
| |/
* / Move more newlines out of strings, and fix translations.Gavin Andresen2011-12-161-1/+0
|/
* Implement an mlock()'d string class for storing passphrasesDylan Noblesmith2011-11-261-0/+4
| | | | | | | SecureString is identical to std::string except with secure_allocator substituting for std::allocator. This makes casting between them impossible, so converting between the two at API boundaries requires calling ::c_str() for now.
* Cleaned up the critical section macros.Clark Gaebel2011-11-021-9/+15
|
* Fix build on windows and macGavin Andresen2011-10-071-9/+9
| | | | | | 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.
* Fix for 64bit buildVictor Leschuk2011-10-061-2/+2
|
* simpler ByteReverseNils Schneider2011-09-301-20/+1
|
* remove cryptopp dependency, add simple unittest for SHA256Transform()Nils Schneider2011-09-301-0/+25
|
* Merge pull request #524 from sipa/signandverifGavin Andresen2011-09-301-0/+4
|\ | | | | Sign and verify message with bitcoin address
| * Inline base64 encoder/decoderPieter Wuille2011-09-271-1/+4
| | | | | | | | | | | | | | 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.
| * Faster Base64 decoder.JoelKatz2011-09-271-0/+1
| |
* | Add assertion size>0 to MedianFilterWladimir J. van der Laan2011-09-291-0/+1
| |
* | Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan2011-09-281-1/+2
|\| | | | | | | | | | | Conflicts: .gitignore (used upstream version) bitcoin-qt.pro
| * Remove wxWidgetsGavin Andresen2011-09-261-1/+1
| | | | | | | | | | | | | | 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.
| * Merge pull request #517 from gavinandresen/DoSpreventionGavin Andresen2011-09-261-0/+1
| |\ | | | | | | Denial-of-service prevention
| | * SetMockTime() for cleaner unit testingGavin Andresen2011-09-211-0/+1
| | |
| | * Revert "Define MSG_NOSIGNAL to 0 on platforms where it is unavailable."Jeff Garzik2011-09-061-3/+1
| | | | | | | | | | | | | | | | | | This reverts commit 6a0296791d5e81102a12a3142f5be25cb40f9825. The change breaks build on Fedora Linux.
| | * Define MSG_NOSIGNAL to 0 on platforms where it is unavailable.Venkatesh Srinivas2011-09-061-1/+3
| | | | | | | | | | | | Enables building bitcoind on OpenBSD.
* | | use median filter for peer-reported reported number of blocksWladimir J. van der Laan2011-09-281-0/+44
|/ / | | | | | | | | | | - fixes problem that one misconfigured or malicious node can mess up progress bar - implementation in src/util.h - testcase in src/test/util_tests.cpp
* | Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan2011-09-021-8/+0
|\| | | | | | | | | Conflicts: src/main.cpp
| * Move func 'REF' from util.h to serialize.hGiel van Schijndel2011-08-191-8/+0
| | | | | | | | | | | | | | | | | | util.h doesn't use REF, serialize.h does, creating a dependency of serialize.h on util.h, but util.h already depends on serialize.h. To resolve this circular dependency the function 'REF' has now been moved closer to one of its two points of use. Signed-off-by: Giel van Schijndel <[email protected]>
* | Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan2011-08-221-26/+30
|\|
| * Compile with DEBUG_LOCKORDER to detect inconsistent lock orderings that can ↵Gavin Andresen2011-08-171-26/+30
| | | | | | | | cause deadlocks
* | Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan2011-08-161-0/+1
|\|
| * Unify copyright notices.Matt Corallo2011-08-091-0/+1
| | | | | | | | | | | | To a variation on: // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers
* | Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan2011-08-061-0/+3
|\|
| * Fix UNIX-specific thread handle leak.JoelKatz2011-07-251-0/+3
| |
* | Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan2011-07-151-3/+3
|\|
| * fix warnings: expression result unused [-Wunused-value]Giel van Schijndel2011-07-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the assert()s take advantage of the fact that string constants ("string") are effectively of type 'const char []', which when used in an expression yield a non-NULL pointer. An assertion that should always fail can thus be formulated as: assert(!"fail); An assertion where a text message should be added to the expression can be written as such: assert("message" && expression); Signed-off-by: Giel van Schijndel <[email protected]>
| * fix warning on 64bit systems: cast to pointer from integer of different size ↵Giel van Schijndel2011-07-131-1/+1
| | | | | | | | | | | | [-Wint-to-pointer-cast] Signed-off-by: Giel van Schijndel <[email protected]>
| * Merge pull request #226 from jordanlewis/betterheadersJeff Garzik2011-06-141-1/+0
| |\ | | | | | | Optimize header dependencies; improve Makefile dependency graph
| | * Only include certain boost headers if necessary.Jordan Lewis2011-05-171-1/+0
| | |
| * | Faster timeout when connectingPieter Wuille2011-06-121-0/+2
| |/ | | | | | | | | | | | | | | | | Use non-blocking connects, and a select() call to wait a predefined time (5s by default, but configurable with -timeout) for either success or failure. This allows much more connections to be tried per time unit. Based on a patch by phantomcircuit.
| * Build error mingw, missing std::Gavin Andresen2011-05-151-1/+1
| |
| * make bitcoin include files more modularWladimir J. van der Laan2011-05-151-36/+59
| |
| * directory re-organization (keeps the old build system)Jaromil2011-04-231-0/+657
| | | | | | | | | | | | | | | | | | | 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
* update core to d0d80170a2ca73004e08fb85007fe055cbf4e411 (CWallet class)Wladimir J. van der Laan2011-06-261-3/+1
|
* update bitcoin core from git (eeac8727bc0a951631bd)Wladimir J. van der Laan2011-06-181-1/+0
|
* Internationalization -- initial step, make _ return a std::string to prevent ↵Wladimir J. van der Laan2011-06-131-4/+4
| | | | memory leaks