Age | Commit message (Collapse) | Author |
|
|
|
|
|
Remove CBaseChainParams::NetworkID()
|
|
|
|
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
|
|
|
|
Always make a pid file, not only when `-daemon` specified.
This is useful for troubleshooting, for attaching debuggers and loggers
and such.
- Write the pid file only after the datadir lock was acquired
- Don't create or remove a pid file on WIN32, and also don't show the option
|
|
8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
|
|
Flushing after every line when printing to console is desirable when
running with systemd but setvbuf() has slightly different semantics
on Windows that causes warnings. Just do an explicit fflush() after
each line print to console instead.
|
|
|
|
Split up util.cpp/h into:
- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)
The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).
Breaks dependency of sha256.cpp on all the things pulled in by util.
|
|
|
|
Put the THREAD_* and PRIO_ constants in compat.h.
|
|
Use AC_CHECK_HEADERS to check for the header, and include it only
if detected and the subsequent HAVE_SYS_PRCTL_H is set.
|
|
Because of a typo, thread names no longer appeared in the overview.
This was broken in 51ed9ec.
|
|
Add a function `AreBaseParamsConfigured` and use this to check
before writing to the debug log. This avoids assertions when the
application happens to log too early, which happens in the GUI.
Messages logged before the base parameters are configured can be
shown using `-printtoconsole`.
|
|
|
|
- add a small wrapper in util around RAND_bytes() and replace with
GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
|
|
cf04d83 add OpenSSL RAND_cleanup() on OpenSSL shutdown (Philip Kaufmann)
|
|
There is no need for it in the utility libraries or tools.
Put it in init.cpp, and in the tests separately (as they can't link init).
|
|
|
|
de79aaa Move non-trivial uint256.h methods to uint256.cpp (Pieter Wuille)
|
|
|
|
86fe1b8 update coding.md to reflect changes by pull (Philip Kaufmann)
e10dcf2 ensure clean and consistent "namespace" usage (Philip Kaufmann)
|
|
8ae973c Allocate more space if necessary in RandSeedAddPerfMon (Wladimir J. van der Laan)
be873f6 Issue warning if collecting RandSeed data failed (Wladimir J. van der Laan)
fcb0a1b change "char pch[200000]" to "new char[200000]" (daniel)
|
|
Currently we use a fixed buffer of 250000 bytes to request
HKEY_PERFORMANCE_DATA. In many cases this is not enough, causing the
entropy collection to be skipped.
Use a loop that grows the buffer as specified in the RegQueryValueEx
documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724911%28v=vs.85%29.aspx
(as the size of the performance data can differ for every call, the
normal solution of requesting the size then allocating that can't work)
|
|
- to securely erase the memory used by the PNRG
- also rework 2 comments in OpenSSL init
|
|
- remove some missplaced ;
- ensure end of a namespace is clearly visible
- use same formatting when using namespace
|
|
This commit removes all the unnecessary dependencies (key, core,
netbase, sync, ...) from bitcoin-cli.
To do this it shards the chain parameters into BaseParams, which
contains just the RPC port and data directory (as used by utils and
bitcoin-cli) and Params, with the rest.
|
|
The network time-offset-mangement functions from util.cpp are moved to
timedata.(cpp|h). This breaks the dependency of util on netbase.
|
|
|
|
|
|
71aaff3 Remove double-dash parameters from mapArgs (Kosta Zertsekel)
|
|
This is to be used for the `-version` and `-help` messages.
|
|
- contains zero code changes
|
|
Should be merged after pull request #4281
("Add `-version` option to get just the version #4281"),
because is changed "--help" to "-help".
Checked that grep of 'mapArgs.count("--' returned only
three places that are fixed by pull request #4281.
|
|
- better code readability and it belongs to net
- this is a prerequisite for a pull to add -listen to the GUI
|
|
f40dbee remove CPubKey::VerifyCompact( ) which is never used (Kamil Domanski)
28b6c1d remove GetMedianTime( ) which is never used (Kamil Domanski)
5bd4adc remove LookupHostNumeric( ) which is never used (Kamil Domanski)
595f691 remove LogException( ) which is never used (Kamil Domanski)
f4057cb remove CTransaction::IsNewerThan which is never used (Kamil Domanski)
0e31e56 remove CWallet::AddReserveKey which is never used (Kamil Domanski)
|
|
Make DateTimeStrFormat use boost::posix_time.
Also re-enable the util_DateTimeStrFormat tests, as they are no
longer platform specific.
|
|
|
|
5248ff4 SetupEnvironment() - clean commit (Stuart Cardall)
|
|
|
|
|
|
No longer necessary after implementing netmask-based matching.
Also remove a longer-unused function `skipspaces`.
|
|
None of the current integer parsing functions in util
check whether the result is valid and fits in the range
of the type. This is required for less sloppy error reporting.
|
|
Ignores any exceptions thrown if directory exists, otherwise re-throws exception.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
|
|
|
|
4423571 Replace PrintException with PrintExceptionContinue + throw (Wladimir J. van der Laan)
|
|
Just a pet peeve.
(PrintException has exactly the same body as PrintExceptionContinue but
does a re-throw at the end. Move these re-throws to the call
site, this aids understanding what is going on as well as eliminates a
bit of code duplication in util.cpp)
|
|
Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h
indirectly, so we cannot fix this with just macros.
Trivial commit: apply the following script to all .cpp and .h files:
# Middle
sed -i 's/"PRIx64"/x/g' "$1"
sed -i 's/"PRIu64"/u/g' "$1"
sed -i 's/"PRId64"/d/g' "$1"
# Initial
sed -i 's/PRIx64"/"x/g' "$1"
sed -i 's/PRIu64"/"u/g' "$1"
sed -i 's/PRId64"/"d/g' "$1"
# Trailing
sed -i 's/"PRIx64/x"/g' "$1"
sed -i 's/"PRIu64/u"/g' "$1"
sed -i 's/"PRId64/d"/g' "$1"
After this commit, `git grep` for PRI.64 should turn up nothing except
the defines in util.h.
|