Fixes at least #3478.
Splits and documents the phases:
1. Parse command-line options. These take precedence over anything else.
2. Basic Qt initialization (not dependent on parameters or configuration)
3. Application identification
4. Initialization of translations
5. Now that settings and translations are available, ask user for data directory
6. Determine availability of data directory and parse bitcoin.conf
7. URI IPC sending
8. Main GUI initialization
Splits command line parsing logic from ipcSendCommandLine into
ipcParseCommandLine, as isTestNet() can only be overridden in the early
stages before choosing a data directory. Sending however needs to happen
after choosing a data directory.
Pressing <tab> after entering a label now brings the focus to the
address entry, instead of the row of buttons. In my experience this
is more useful, as I usually want to paste an address after
entering the label.
The buttons are mostly useless anyway:
- Choosing a previously used address should be discouraged
- When I'm already using the keyboard the 'paste address' button is
useless - just use the Ctrl-V. Maybe it would be an idea to remove it
completely
- I usually don't want to remove the entry I'm typing now! So makes
sense to have it at the end of the tab chain.
Unit tests for uint256.h. The file uint160_tests.cpp is no longer
needed. The ad-hoc tests which were in uint256.h are also no longer
needed. The new tests achieve 100% coverage.
The function Get64(.) has a bug in case the width is not divisible by 64.
Since it is only ever used as Get64(0) this simply changes it to this
special case. Additionally, an assert is added, and a cast to prevent
a compiler error.
Allow running bitcoind without server.
- Default to -server mode (of course) for bitcoind with SoftSetBoolArg
- Remove fForceServer argument from AppInit2
- Move fDaemon to a static variable in bitcoind
- re-work change address handling so that default is CNoDestination(),
until a verified and known change address was entered (easier code flow)
- add a missing NULL pointer check for adresstablemodel
- add a missing text when opening coin control address selection for
priority and ensure the label is black
- add a missing . at the end of a sentence
When a InitError or InitWarning happens, the
GUI pops up but is unusable (until Init finishes).
This is caused by showNormalIfMinimized. Add a message
flag to skip this call for Init errors or warnings.
The current transaction loading code is not exception safe.
An exception during deserialization causes an empty transaction
to be left behind in the wallet.
Fix this by building the transaction separately and adding
it only to the wallet at the end.
Fixes#3333.
Seperate out the wallet options in HelpMessage, and
don't show them if compiled with --disable-wallet.
Also add documentation for `-disablewallet` option.
Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance.
This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.)
Before the fix, there were 6 errors such as :
serialize_tests.cpp:77: error in "noncanonical": incorrect exception std::ios_base::failure is caught
It turns out that ex.what() returns following string instead of "non-canonical ReadCompactSize()"
"non-canonical ReadCompactSize(): unspecified iostream_category error"
After the fix, unit test passed.
The test ran using Apple LLVM v5.0 on OSX 10.9 and the unit test error happened because of different error messages by different compilers.
g++ --version on my development environment.
```
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
```
`-logtodebugger` is a strange, obscure, WIN32-only (mostly MSVC) thing.
Let's clean up the options a bit get rid of it.
test_bitcoin was using fLogToDebugger as a way to prevent logging to
debug.log. For this, add a boolean (not exposed as option) fLogToDebugLog that
defaults to true and is disabled in the tests.
ThreadSafeAskFee is effectively unused. It is only called
when the fAskFee parameter on SendMoney or SendMoneyToDestination
is true, which never happens. Remove it.
`getinfo` is a general info method which shows information
from multiple sources, it doesn't belong in rpcnet.cpp or
any of the other current RPC implementation files.
Only messages for now, executable names and other file names
can be changed later if necessary and safe.
Do not do an all-sweeping change. Some occurences of Bitcoin-Qt need to
be kept:
- Applicationname: this is used to determine the registry entry names,
we don't want to lose settings over a silly name change.
- Where it refers to the executable name instead of the product name.