aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/init.cpp b/src/init.cpp
index bb93342631..5fbe9d5d64 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -9,7 +9,6 @@
#include "init.h"
#include "util.h"
#include "ui_interface.h"
-#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/convenience.hpp>
@@ -41,14 +40,23 @@ void ExitTimeout(void* parg)
void StartShutdown()
{
+#ifdef QT_GUI
// ensure we leave the Qt main loop for a clean GUI exit (Shutdown() is called in bitcoin.cpp afterwards)
uiInterface.QueueShutdown();
+#else
+ // Without UI, Shutdown() can simply be started in a new thread
+ CreateThread(Shutdown, NULL);
+#endif
}
void Shutdown(void* parg)
{
static CCriticalSection cs_Shutdown;
static bool fTaken;
+
+ // Make this thread recognisable as the shutdown thread
+ RenameThread("bitcoin-shutoff");
+
bool fFirstThread = false;
{
TRY_LOCK(cs_Shutdown, lockShutdown);
@@ -150,11 +158,6 @@ bool AppInit(int argc, char* argv[])
exit(ret);
}
- // Create the shutdown thread when receiving a shutdown signal
- boost::signals2::scoped_connection do_stop(
- uiInterface.QueueShutdown.connect(boost::bind(
- &CreateThread, &Shutdown, static_cast<void*>(0), false)));
-
fRet = AppInit2();
}
catch (std::exception& e) {
@@ -213,6 +216,7 @@ bool static Bind(const CService &addr, bool fError = true) {
std::string HelpMessage()
{
string strUsage = _("Options:") + "\n" +
+ " -? " + _("This help message") + "\n" +
" -conf=<file> " + _("Specify configuration file (default: bitcoin.conf)") + "\n" +
" -pid=<file> " + _("Specify pid file (default: bitcoind.pid)") + "\n" +
" -gen " + _("Generate coins") + "\n" +
@@ -240,7 +244,7 @@ std::string HelpMessage()
" -banscore=<n> " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" +
" -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" +
" -maxreceivebuffer=<n> " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n" +
- " -maxsendbuffer=<n> " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 5000)") + "\n" +
+ " -maxsendbuffer=<n> " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n" +
#ifdef USE_UPNP
#if USE_UPNP
" -upnp " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n" +
@@ -276,10 +280,13 @@ std::string HelpMessage()
" -checkblocks=<n> " + _("How many blocks to check at startup (default: 2500, 0 = all)") + "\n" +
" -checklevel=<n> " + _("How thorough the block verification is (0-6, default: 1)") + "\n" +
" -loadblock=<file> " + _("Imports blocks from external blk000?.dat file") + "\n" +
- " -? " + _("This help message") + "\n";
- strUsage += string() +
- _("\nSSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n" +
+ "\n" + _("Block creation options:") + "\n" +
+ " -blockminsize=<n> " + _("Set minimum block size in bytes (default: 0)") + "\n" +
+ " -blockmaxsize=<n> " + _("Set maximum block size in bytes (default: 250000)") + "\n" +
+ " -blockprioritysize=<n> " + _("Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)") + "\n" +
+
+ "\n" + _("SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n" +
" -rpcssl " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n" +
" -rpcsslcertificatechainfile=<file.cert> " + _("Server certificate file (default: server.cert)") + "\n" +
" -rpcsslprivatekeyfile=<file.pem> " + _("Server private key (default: server.pem)") + "\n" +