This changes the block processing logic from "try to atomically switch
to a new block" to a continuous "(dis)connect a block, aiming for the
assumed best chain".
This means the smallest atomic operations on the chainstate become
individual block connections or disconnections, instead of entire
reorganizations. It may mean that we try to reorganize to one block,
fail, and rereorganize again to the old block. This is slower, but
doesn't require unbounded RAM.
It also means that a ConnectBlock which fails may be no longer called
from the ProcessBlock which knows which node sent it. To deal with that,
a mapBlockSource is kept, and invalid blocks cause asynchronous "reject"
messages and banning (if necessary).
Previously CreateNewBlock() didn't take into account the fact that
IsFinalTx() without any arguments tests if the transaction is considered
final in the *current* block, when both those functions really needed to
know if the transaction would be final in the *next* block.
Additionally the UI had a similar misunderstanding.
Also adds some basic tests to check that CreateNewBlock() is in fact
mining nLockTime-using transactions correctly.
Thanks to Wladimir J. van der Laan for rebase.
Unit tests would fail if compiled with -DDEBUG_LOCKORDER (AssertLockHeld()
would fail; AssertLockHeld() relies on the DEBUG_LOCKORDER code to keep
track of locks held).
Fixed by LOCK'ing the wallet mutex in the unit tests that manipulate the
wallet.
After the tinyformat switch sprintf() family functions support passing
actual std::string objects.
Remove unnecessary c_str calls (236 of them) in logging and formatting.
- rebuilt some ui file layout to remove unreal values from the files
- remove an unneeded attribute from an ui file
- add / remove some spaces in files
From a cursory glance, it looks like block 279,000 meets the criteria for
a checkpoint block, and it's also what the bootstrap.dat torrent is at. This closes#3530.
- adds a nice and well formated dialog, which displays our -? help message
(all options/paramaters)
- moves aboutdialog.cpp/h to the new utilitydialog
- move GUI shutdown window to utilitydialog
Currently it is only possible to use `walletpassphrase` to unlock the
wallet when bitcoin is started in server mode.
Almost everything that manipulates the wallet in the RPC console
needs the wallet to be unlocked and is thus unusable without -server.
This is pretty unintuitive to me, and I'm sure it's even more confusing
to users.
Solve this with a very minimal change: by making the GUI start a
dummy RPC thread just to handle timeouts.
- as a proxy set via GUI can be overridden via -proxy, directly query the
core to get active proxy
- give a warning, if active proxy is not SOCKS5 (needs to be SOCKS5 for
the Qt networking code to work)
- also remove an obsolete connect() call from optionsdialog.cpp and a
reference to Bitcoin-Qt (now just GUI)
Use a series of .png frames for the spinner instead of a .mng.
`mng` is an obscure image format and is not built by default into Qt5.
This appears to improve the crispness of the spinner as well.
Does not noticably increase the size (still ~27k) and the code
is not more complicated either.