aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am11
-rw-r--r--src/bitcoin-cli.cpp1
-rw-r--r--src/init.cpp6
-rw-r--r--src/key.h2
-rw-r--r--src/main.cpp10
-rw-r--r--src/qt/forms/rpcconsole.ui2
-rw-r--r--src/qt/trafficgraphwidget.cpp8
7 files changed, 20 insertions, 20 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3089b2ff40..8b5d009842 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -171,6 +171,7 @@ libbitcoin_server_a_SOURCES = \
rpcnet.cpp \
rpcrawtransaction.cpp \
rpcserver.cpp \
+ script/sigcache.cpp \
timedata.cpp \
txdb.cpp \
txmempool.cpp \
@@ -232,7 +233,6 @@ libbitcoin_common_a_SOURCES = \
pubkey.cpp \
script/interpreter.cpp \
script/script.cpp \
- script/sigcache.cpp \
script/sign.cpp \
script/standard.cpp \
$(BITCOIN_CORE_H)
@@ -301,13 +301,10 @@ bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
# bitcoin-cli binary #
bitcoin_cli_LDADD = \
$(LIBBITCOIN_CLI) \
- $(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \
- $(LIBBITCOIN_CRYPTO) \
$(BOOST_LIBS) \
$(SSL_LIBS) \
- $(CRYPTO_LIBS) \
- $(MINIUPNPC_LIBS)
+ $(CRYPTO_LIBS)
bitcoin_cli_SOURCES = \
bitcoin-cli.cpp
@@ -330,9 +327,7 @@ if USE_LIBSECP256K1
endif
bitcoin_tx_LDADD += $(BOOST_LIBS) \
- $(SSL_LIBS) \
- $(CRYPTO_LIBS) \
- $(MINIUPNPC_LIBS)
+ $(CRYPTO_LIBS)
bitcoin_tx_SOURCES = bitcoin-tx.cpp
bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 11840e62a8..a2b95d5086 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -5,7 +5,6 @@
#include "chainparamsbase.h"
#include "clientversion.h"
-#include "init.h"
#include "rpcclient.h"
#include "rpcprotocol.h"
#include "util.h"
diff --git a/src/init.cpp b/src/init.cpp
index fe58c68fda..22ec80e17b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -320,7 +320,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += ".\n";
#ifdef ENABLE_WALLET
strUsage += " -gen " + strprintf(_("Generate coins (default: %u)"), 0) + "\n";
- strUsage += " -genproclimit=<n> " + strprintf(_("Set the processor limit for when generation is on (-1 = unlimited, default: %d)"), -1) + "\n";
+ strUsage += " -genproclimit=<n> " + strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 1) + "\n";
#endif
strUsage += " -help-debug " + _("Show all debugging options (usage: --help -help-debug)") + "\n";
strUsage += " -logips " + strprintf(_("Include IP addresses in debug output (default: %u)"), 0) + "\n";
@@ -746,8 +746,8 @@ bool AppInit2(boost::thread_group& threadGroup)
LogPrintf("Using at most %i connections (%i file descriptors available)\n", nMaxConnections, nFD);
std::ostringstream strErrors;
+ LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads);
if (nScriptCheckThreads) {
- LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads);
for (int i=0; i<nScriptCheckThreads-1; i++)
threadGroup.create_thread(&ThreadScriptCheck);
}
@@ -1263,7 +1263,7 @@ bool AppInit2(boost::thread_group& threadGroup)
#ifdef ENABLE_WALLET
// Generate coins in the background
if (pwalletMain)
- GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", -1));
+ GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1));
#endif
// ********************************************************* Step 11: finished
diff --git a/src/key.h b/src/key.h
index 8c2f44801d..f36e658dee 100644
--- a/src/key.h
+++ b/src/key.h
@@ -13,7 +13,7 @@
#include <stdexcept>
#include <vector>
-class CExtPubKey;
+struct CExtPubKey;
class CPubKey;
/**
diff --git a/src/main.cpp b/src/main.cpp
index 82d52913a0..4aa49531b3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1760,9 +1760,9 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
}
// Update the on-disk chain state.
-bool static WriteChainState(CValidationState &state) {
+bool static WriteChainState(CValidationState &state, bool forceWrite=false) {
static int64_t nLastWrite = 0;
- if (pcoinsTip->GetCacheSize() > nCoinCacheSize || (!IsInitialBlockDownload() && GetTimeMicros() > nLastWrite + 600*1000000)) {
+ if (forceWrite || pcoinsTip->GetCacheSize() > nCoinCacheSize || (!IsInitialBlockDownload() && GetTimeMicros() > nLastWrite + 600*1000000)) {
// Typical CCoins structures on disk are around 100 bytes in size.
// Pushing a new one to the database can cause it to be written
// twice (once in the log, and once in the tables). This is already
@@ -3022,6 +3022,8 @@ bool InitBlockIndex() {
return error("LoadBlockIndex() : genesis block not accepted");
if (!ActivateBestChain(state, &block))
return error("LoadBlockIndex() : genesis block cannot be activated");
+ // Force a chainstate write so that when we VerifyDB in a moment, it doesnt check stale data
+ return WriteChainState(state, true);
} catch(std::runtime_error &e) {
return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());
}
@@ -3157,12 +3159,14 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
}
// process in case the block isn't known yet
- if (mapBlockIndex.count(hash) == 0) {
+ if (mapBlockIndex.count(hash) == 0 || (mapBlockIndex[hash]->nStatus & BLOCK_HAVE_DATA) == 0) {
CValidationState state;
if (ProcessNewBlock(state, NULL, &block, dbp))
nLoaded++;
if (state.IsError())
break;
+ } else if (hash != Params().HashGenesisBlock() && mapBlockIndex[hash]->nHeight % 1000 == 0) {
+ LogPrintf("Block Import: already had block %s at height %d\n", hash.ToString(), mapBlockIndex[hash]->nHeight);
}
// Recursively process earlier encountered successors of this block
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 898df2b080..c5ac371619 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -689,7 +689,7 @@
<item row="0" column="0" rowspan="2">
<widget class="QTableView" name="peerWidget">
<property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
+ <enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp
index 74565bb6d0..5f14b80797 100644
--- a/src/qt/trafficgraphwidget.cpp
+++ b/src/qt/trafficgraphwidget.cpp
@@ -76,10 +76,12 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
int base = floor(log10(fMax));
float val = pow(10.0f, base);
- const QString units = tr("KB/s");
+ const QString units = tr("KB/s");
+ const float yMarginText = 2.0;
+
// draw lines
painter.setPen(axisCol);
- painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax, QString("%1 %2").arg(val).arg(units));
+ painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units));
for(float y = val; y < fMax; y += val) {
int yy = YMARGIN + h - h * y / fMax;
painter.drawLine(XMARGIN, yy, width() - XMARGIN, yy);
@@ -89,7 +91,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
axisCol = axisCol.darker();
val = pow(10.0f, base - 1);
painter.setPen(axisCol);
- painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax, QString("%1 %2").arg(val).arg(units));
+ painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units));
int count = 1;
for(float y = val; y < fMax; y += val, count++) {
// don't overwrite lines drawn above