aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
AgeCommit message (Collapse)Author
2012-06-21Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: doc/unit-tests.txt src/serialize.h
2012-06-20Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/main.cpp src/serialize.h
2012-06-18Don't overflow integer on 32-bit machines.Ricardo M. Correia
This was causing test_bitcoin to abort on a 32-bit system likely due to -ftrapv.
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-05-20Update License in File HeadersFordy
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-20Update License in File HeadersFordy
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-20Update License in File HeadersFordy
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-03-26Begin doxygen-compatible commentsPieter Wuille
2012-03-25remove unused functions from util.h/util.cppWladimir J. van der Laan
2012-03-11Merge branch '0.5.0.x' into 0.5.xv0.5.3rc4v0.5.3Luke Dashjr
2012-03-11Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-03-11Resolves issue #922 - "wallet passphrase timeout of several years doesn't work"Gregory Maxwell
2^31 milliseconds is only about 25 days. Also clamps Sleep() to 10 years, because it currently sleeps for 0 seconds when the sleep time would cross 2^31 seconds since the epoch. Hopefully boost will be fixed by 2028.
2012-03-10Resolves issue #922 - "wallet passphrase timeout of several years doesn't work"Gregory Maxwell
2^31 milliseconds is only about 25 days. Also clamps Sleep() to 10 years, because it currently sleeps for 0 seconds when the sleep time would cross 2^31 seconds since the epoch. Hopefully boost will be fixed by 2028.
2012-02-26Reworked QT settingsGavin Andresen
2012-02-17Merge branch '0.5.0.x' into 0.5.xLuke Dashjr
2012-02-17Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
2012-02-17Macros for manual critical sectionsPieter Wuille
2012-02-11Macros for manual critical sectionsPieter Wuille
2012-02-07Merge branch '0.5.0.x' into 0.5.xLuke Dashjr
Conflicts: src/qt/locale/bitcoin_ru.ts src/qt/locale/bitcoin_zh_TW.ts
2012-02-07Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
Conflicts: src/bitcoinrpc.cpp
2012-02-07Update copyrights to 2012 for files modified this yearLuke Dashjr
2012-02-07Update all copyrights to 2012Gavin Andresen
2012-02-07Unit tests for the GetArg() methodsGavin Andresen
2012-02-06-bip16 option (default: 1) to support / not support BIP 16. And bumped ↵Gavin Andresen
default BIP16 switchover date from Feb 15 to Mar 1
2012-01-23Merge branch '0.5.0.x' into 0.5.xLuke Dashjr
2012-01-23Replace tabs with four spaces to comply with coding standard in doc/coding.txtLars Rasmusson
2012-01-14Replace tabs with four spaces to comply with coding standard in doc/coding.txtLars Rasmusson
2012-01-13Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen
2012-01-06Network stack refactorPieter Wuille
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-03Merge branch '0.5.0.x' into 0.5.xLuke Dashjr
2012-01-03Merge branch '0.4.x' into 0.5.0.xLuke Dashjr
Conflicts: src/util.cpp
2012-01-03Fix issue #659, and cleanup wallet/command-line argument handling a bitGavin Andresen
Conflicts: src/init.cpp src/util.cpp
2012-01-03Fix issue #659, and cleanup wallet/command-line argument handling a bitGavin Andresen
2011-12-23Merge branch '0.5.0.x' into 0.5.xLuke Dashjr
2011-12-21Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan
This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
2011-12-20Implement an mlock()'d string class for storing passphrasesDylan Noblesmith
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.
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-19Cleanup: removed dead code, and use C99 typedefs for int64 (supported by all ↵Gavin Andresen
modern c++ compilers)
2011-12-19Merge pull request #707 from gavinandresen/BIP14Gavin Andresen
Implement BIP 14 : separate protocol version from client version
2011-12-19Implement BIP 14 : separate protocol version from client versionGavin Andresen
2011-12-16Move more newlines out of strings, and fix translations.Gavin 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-11-26Implement an mlock()'d string class for storing passphrasesDylan Noblesmith
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.
2011-11-02Cleaned up the critical section macros.Clark Gaebel
2011-10-07Fix for 64bit buildVictor Leschuk
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-06Fix for 64bit buildVictor Leschuk