aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Give threads a recognisable name to aid in debuggingGiel van Schijndel2012-07-171-3/+1
| | | | | | | | 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 <[email protected]>
* CHashWriter that does SHA256 in-place during serializationPieter Wuille2012-07-071-6/+42
|
* Merge pull request #1174 from sipa/torhsGregory Maxwell2012-06-231-0/+4
|\ | | | | Tor hidden service support
| * Base32 encoding/decodingPieter Wuille2012-06-221-0/+4
| |
* | Merge pull request #1458 from jgarzik/tracenetJeff Garzik2012-06-221-0/+1
|\ \ | |/ |/| Introduce -tracenet option, thereby quieting some redundant debug messages
| * Introduce -debugnet option, thereby quieting some redundant debug messagesJeff Garzik2012-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this change, each TX typically generated 3+ debug messages, askfor tx 8644cc97480ba1537214 0 sending getdata: tx 8644cc97480ba1537214 askfor tx 8644cc97480ba1537214 1339640761000000 askfor tx 8644cc97480ba1537214 1339640881000000 CTxMemPool::accept() : accepted 8644cc9748 (poolsz 6857) After this change, there is only one message for each valid TX received CTxMemPool::accept() : accepted 22a73c5d8c (poolsz 42) and two messages for each orphan tx received ERROR: FetchInputs() : 673dc195aa mempool Tx prev not found 1e439346fc stored orphan tx 673dc195aa (mapsz 19) The -debugnet option, or its superset -debug, will restore the full debug output.
* | Merge branch 'signbugs' of https://github.com/wizeman/bitcoinGavin Andresen2012-06-181-1/+1
|\ \ | |/ |/| | | Resolved minor conflict in main.cpp
| * Move NOINLINE definition to test where it's used.Ricardo M. Correia2012-06-071-17/+0
| |
| * Don't overflow integer on 32-bit machines.Ricardo M. Correia2012-06-071-1/+1
| | | | | | | | This was causing test_bitcoin to abort on a 32-bit system likely due to -ftrapv.
| * Fix noinline definition so that it works for more compilers.Ricardo M. Correia2012-05-311-0/+17
| |
* | Refactor: move runCommand() to util.cppJeff Garzik2012-05-231-0/+1
| |
* | Merge branch 'optimize'Gavin Andresen2012-05-221-0/+1
|\ \
| * | Refactor: GetRandHash() method for utilGavin Andresen2012-05-171-0/+1
| | |
* | | Merge pull request #917 from mndrix/reopen-log-filePieter Wuille2012-05-211-0/+1
|\ \ \ | | | | | | | | Reopen log file on SIGHUP
| * | | Reopen debug.log on SIGHUPMichael Hendricks2012-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The best log rotation method formerly available was to configure logrotate with the copytruncate option. As described in the logrotate documentation, "there is a very small time slice between copying the file and truncating it, so some logging data might be lost". By sending SIGHUP to the server process, one can now reopen the debug log file without losing any data.
* | | | Merge pull request #1354 from fanquake/masterPieter Wuille2012-05-201-1/+1
|\ \ \ \ | | | | | | | | | | Update Header Licenses
| * | | | Update License in File HeadersFordy2012-05-181-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1302 from laanwj/2012_05_utilstringsWladimir J. van der Laan2012-05-201-5/+1
|\ \ \ \ | |/ / / |/| | | Get rid of snprintf (except one) with fixed buffers, shorten code
| * | | Get rid of snprintf (except one) with fixed buffers, shorten codeWladimir J. van der Laan2012-05-141-5/+1
| | |/ | |/| | | | | | | - Use strprintf or vstrprintf instead of snprintf
* / | Add new utility functions FileCommit(), RenameOver()Jeff Garzik2012-05-161-0/+2
|/ /
* | Move GetStartOnSystemStartup and SetStartOnSystemStartup to GUI codeWladimir J. van der Laan2012-05-131-4/+0
| |
* | Split synchronization mechanisms from util.{h,cpp}Pieter Wuille2012-05-111-204/+0
| |
* | Use polling instead of boost's broken semaphore on OSXPieter Wuille2012-05-111-0/+40
| |
* | Use semaphores instead of condition variablesPieter Wuille2012-05-111-15/+56
| |
* | Merge pull request #1134 from Diapolo/util-updatesJeff Garzik2012-05-091-0/+3
|\ \ | | | | | | small util.cpp/h changes
| * | util.h/.ccp: modifiy some comments / rename MyGetSpecialFolderPath() -> ↵Philip Kaufmann2012-05-091-0/+3
| |/ | | | | | | GetSpecialFolderPath(), set fCreate default to true and remove the fallback (not Win >= Vista compatible anyway) / remove namespace fs stuff where only used once / misc small changes'
* / Fix DEBUG_LOCKCONTENTIONMatt Corallo2012-05-091-1/+3
|/
* remove duplicate definition of SecureString in util.hWladimir J. van der Laan2012-05-011-8/+0
| | | | SecureString was moved to allocators.h in commit 6cb6d623479c5dd42d91de7a4d391078d0800e54
* Merge pull request #1140 from jgarzik/sign-compareJeff Garzik2012-04-231-2/+2
|\ | | | | Address many more sign comparison warnings
| * Change signed->unsigned at 3 code sitesJeff Garzik2012-04-231-2/+2
| | | | | | | | This resolves signed/unsigned comparison warnings.
* | Make GetDataDir return absolute pathsPieter Wuille2012-04-221-1/+1
|/
* Integrate @JoelKatz's optimized ToHex (#562) into current HexStr functionWladimir J. van der Laan2012-04-211-9/+14
|
* Further reduce header dependenciesPieter Wuille2012-04-171-1/+0
| | | | | | | This commit removes the dependency of serialize.h on PROTOCOL_VERSION, and makes this parameter required instead of implicit. This is much saner, as it makes the places where changing a version number can have an influence obvious.
* Remove headers.hPieter Wuille2012-04-171-4/+7
|
* Remove obsolete Win32 AffinityBugWorkaround()Jeff Garzik2012-04-121-20/+0
| | | | | | Reference miner exists for testnet-in-a-box type situations, and as a reference. We don't care enough about highly optimized internal mining to keep workarounds like this.
* Use filesystem::path instead of manual string tinkeringPieter Wuille2012-04-111-8/+8
| | | | | | | | | | | | | | Where possible, use boost::filesystem::path instead of std::string or char* for filenames. This avoids a lot of manual string tinkering, in favor of path::operator/. GetDataDir is also reworked significantly, it now only keeps two cached directory names (the network-specific data dir, and the root data dir), which are decided through a parameter instead of pre-initialized global variables. Finally, remove the "upgrade from 0.1.5" case where a debug.log in the current directory has to be removed.
* Do not report spurious deadlocks caused by TRY_LOCKPieter Wuille2012-04-091-3/+3
|
* Use scoped locks instead of CRITICAL_BLOCKPieter Wuille2012-04-091-11/+4
|
* Locking system overhaul, add condition variablesPieter Wuille2012-04-041-51/+106
| | | | | | | | | | | | | | | | | | | | | | This commit simplifies the locking system: CCriticalSection becomes a simple typedef for boost::interprocess::interprocess_recursive_mutex, and CCriticalBlock and CTryCriticalBlock are replaced by a templated CMutexLock, which wraps boost::interprocess::scoped_lock. By making the lock type a template parameter, some critical sections can now be changed to non-recursive locks, which support waiting via condition variables. These are implemented in CWaitableCriticalSection and WAITABLE_CRITICAL_BLOCK. CWaitableCriticalSection is a wrapper for a different Boost mutex, which supports waiting/notification via condition variables. This should enable us to remove much of the used polling code. Important is that this mutex is not recursive, so functions that perform the locking must not call eachother. Because boost::interprocess::scoped_lock does not support assigning and copying, I had to revert to the older CRITICAL_BLOCK macros that use a nested for loop instead of a simple if.
* move translation function _ to qtui.h/noui.h instead of util.hWladimir J. van der Laan2012-04-041-7/+0
|
* remove dependency on serialize.h and util.h for SecureStringWladimir J. van der Laan2012-04-041-10/+0
|
* VC2010 compile fixesWladimir J. van der Laan2012-04-031-2/+11
|
* Begin doxygen-compatible commentsPieter Wuille2012-03-261-4/+6
|
* remove unused functions from util.h/util.cppWladimir J. van der Laan2012-03-251-40/+0
|
* Resolves issue #922 - "wallet passphrase timeout of several years doesn't work"Gregory Maxwell2012-03-101-1/+3
| | | | | | 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.
* Reworked QT settingsGavin Andresen2012-02-261-1/+1
|
* Macros for manual critical sectionsPieter Wuille2012-02-111-0/+6
|
* Update all copyrights to 2012Gavin Andresen2012-02-071-1/+1
|
* Unit tests for the GetArg() methodsGavin Andresen2012-02-071-23/+25
|
* -bip16 option (default: 1) to support / not support BIP 16. And bumped ↵Gavin Andresen2012-02-061-1/+1
| | | | default BIP16 switchover date from Feb 15 to Mar 1