Age | Commit message (Collapse) | Author |
|
- explicitly set the default of all GetBoolArg() calls
- rework getarg_test.cpp and util_tests.cpp to cover this change
- some indentation fixes
- move macdockiconhandler.h include in bitcoin.cpp to the "our headers"
section
|
|
remove obsolete and unused typedef for Windows
|
|
|
|
|
|
As the default can be too low, especially on OSX.
|
|
|
|
|
|
|
|
|
|
Two reasons for this change:
1. Need to always use boost::thread's sleep, even on Windows, so the
sleeps can be interrupted (prior code used Windows' built-in Sleep).
2. I always forgot what units the old Sleep took.
|
|
Create a boost::thread_group object at the qt/bitcoind main-loop level
that will hold pointers to all the main-loop threads.
This will replace the vnThreadsRunning[] array.
For testing, ported the BitcoinMiner threads to use its
own boost::thread_group.
|
|
Native versions for AllocateFileRange()
|
|
ApproximateBestSubset internal RNG to prevent degenerate behavior.
|
|
Add adjustedtime to getinfo RPC call
|
|
This fixes test_bitcoin failures on openbsd reported by dhill on IRC.
On some systems rand() is a simple LCG over 2^31 and so it produces
an even-odd sequence. ApproximateBestSubset was only using the least
significant bit and so every run of the iterative solver would be the
same for some inputs, resulting in some pretty dumb decisions.
Using something other than the least significant bit would paper over
the issue but who knows what other way a system's rand() might get us
here. Instead we use an internal RNG with a period of something like
2^60 which is well behaved. This also makes it possible to make the
selection deterministic for the tests, if we wanted to implement that.
|
|
|
|
Provides a method to get the difference between network adjusted time
and local time from the RPC interface.
|
|
Initialize the OutputDebugStringF mutex and file pointer using
boost::call_once, to be thread-safe.
Make the return value of OutputDebugStringF really be the number of
characters written (*printf() semantics).
Declare the fReopenDebugLog flag volatile, since it is changed from
a signal handler.
And don't declare OutputDebugStringF() as inline.
|
|
|
|
Add -benchmark for reporting block processing times
|
|
When the coin database is out of date with the block database, the
best block in it is automatically switched to. This reconnection
process can take time, so allow it to be interrupted.
This also stops block connection as soon as shutdown is requested,
leading to a faster shutdown.
|
|
|
|
|
|
Introduce a AllocateFileRange() function in util, which wipes or
at least allocates a given range of a file. It can be overriden
by more efficient OS-dependent versions if necessary.
Block and undo files are now allocated in chunks of 16 and 1 MiB,
respectively.
|
|
|
|
- remove the "%" character from format characters for (s)size_t and
ptrdiff_t and harmonize them with the ones for int64 and uint64
|
|
|
|
Add printf-style warnings to strprintf() and OutputDebugStringF()
|
|
|
|
|
|
Also const correctness for lookup tables in hex functions throughout the code.
|
|
Encapsulate _snprintf/sprintf difference in implementation not header
|
|
This finds about ~150 potential problems with format characters on a 64 bit build.
|
|
Prevent clash with win32 API symbol
|
|
I'm not sure why this wasn't done before.
- Removes typedef of pthread_t on Windows, which fixes a native compile issue on mingw.
|
|
|
|
|
|
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>
|
|
|
|
Tor hidden service support
|
|
Introduce -tracenet option, thereby quieting some redundant debug messages
|
|
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.
|
|
|
|
Resolved minor conflict in main.cpp
|
|
|
|
This was causing test_bitcoin to abort on a 32-bit system likely due to -ftrapv.
|
|
|
|
|
|
|
|
Reopen log file on SIGHUP
|