aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/allocators.h1
-rw-r--r--src/init.cpp1
-rw-r--r--src/netbase.cpp4
-rw-r--r--src/qt/addressbookpage.cpp5
-rw-r--r--src/qt/guiutil.cpp2
-rw-r--r--src/qt/optionsmodel.cpp2
-rw-r--r--src/qt/transactiondesc.cpp2
-rw-r--r--src/qt/transactiontablemodel.cpp3
-rw-r--r--src/sync.cpp8
-rw-r--r--src/sync.h7
10 files changed, 21 insertions, 14 deletions
diff --git a/src/allocators.h b/src/allocators.h
index 4b3356e874..ddeabc48c5 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -117,7 +117,6 @@ struct zero_after_free_allocator : public std::allocator<T>
};
// This is exactly like std::string, but with a custom allocator.
-// (secure_allocator<> is defined in serialize.h)
typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString;
#endif
diff --git a/src/init.cpp b/src/init.cpp
index f6f443d77d..bf9551e858 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -425,6 +425,7 @@ bool AppInit2()
printf("Bitcoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str());
printf("Startup time: %s\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
printf("Default data directory %s\n", GetDefaultDataDir().string().c_str());
+ printf("Used data directory %s\n", GetDataDir().string().c_str());
std::ostringstream strErrors;
if (fDaemon)
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 80b0e32c39..d1ead79ebb 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -1010,7 +1010,7 @@ bool operator<(const CService& a, const CService& b)
bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const
{
if (IsIPv4()) {
- if (*addrlen < sizeof(struct sockaddr_in))
+ if (*addrlen < (socklen_t)sizeof(struct sockaddr_in))
return false;
*addrlen = sizeof(struct sockaddr_in);
struct sockaddr_in *paddrin = (struct sockaddr_in*)paddr;
@@ -1023,7 +1023,7 @@ bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const
}
#ifdef USE_IPV6
if (IsIPv6()) {
- if (*addrlen < sizeof(struct sockaddr_in6))
+ if (*addrlen < (socklen_t)sizeof(struct sockaddr_in6))
return false;
*addrlen = sizeof(struct sockaddr_in6);
struct sockaddr_in6 *paddrin6 = (struct sockaddr_in6*)paddr;
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index c207987561..5849f5b23d 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -136,11 +136,6 @@ void AddressBookPage::setModel(AddressTableModel *model)
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(selectNewAddress(QModelIndex,int,int)));
- if(mode == ForSending)
- {
- // Auto-select first row when in sending mode
- ui->tableView->selectRow(0);
- }
selectionChanged();
}
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 3f2fc2ffa1..e8df8ad7b0 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -36,6 +36,8 @@
#define NOMINMAX
#endif
#include "shlwapi.h"
+#include "shlobj.h"
+#include "shellapi.h"
#endif
namespace GUIUtil {
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index e65694bb52..64d91cb0b1 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -148,7 +148,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
if (GetProxy(NET_IPV4, addrProxy))
return QVariant(QString::fromStdString(addrProxy.ToStringIP()));
else
- return QVariant(QString::fromStdString("localhost"));
+ return QVariant(QString::fromStdString("127.0.0.1"));
}
case ProxyPort: {
CService addrProxy;
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 10bcef0d90..dc0f28de92 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -226,7 +226,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
strHTML += QString("<b>") + tr("Transaction ID:") + "</b> " + wtx.GetHash().ToString().c_str() + "<br>";
if (wtx.IsCoinBase())
- strHTML += QString("<br>") + tr("Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";
+ strHTML += QString("<br>") + tr("Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it's state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";
//
// Debug view
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index d36bb495a0..a86b1f7c56 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -298,8 +298,7 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons
switch(wtx->status.maturity)
{
case TransactionStatus::Immature:
- status += "\n" + tr("Mined balance will be available in %n more blocks", "",
- wtx->status.matures_in);
+ status += "\n" + tr("Mined balance will be available when it matures in %n more block(s)", "", wtx->status.matures_in);
break;
case TransactionStatus::Mature:
break;
diff --git a/src/sync.cpp b/src/sync.cpp
index f2403a43f2..dbd9ebdaee 100644
--- a/src/sync.cpp
+++ b/src/sync.cpp
@@ -7,6 +7,14 @@
#include <boost/foreach.hpp>
+#ifdef DEBUG_LOCKCONTENTION
+void PrintLockContention(const char* pszName, const char* pszFile, int nLine)
+{
+ printf("LOCKCONTENTION: %s\n", pszName);
+ printf("Locker: %s:%d\n", pszFile, nLine);
+}
+#endif /* DEBUG_LOCKCONTENTION */
+
#ifdef DEBUG_LOCKORDER
//
// Early deadlock detection.
diff --git a/src/sync.h b/src/sync.h
index dffe4f6ee8..98640e6eab 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -27,6 +27,10 @@ void static inline EnterCritical(const char* pszName, const char* pszFile, int n
void static inline LeaveCritical() {}
#endif
+#ifdef DEBUG_LOCKCONTENTION
+void PrintLockContention(const char* pszName, const char* pszFile, int nLine);
+#endif
+
/** Wrapper around boost::interprocess::scoped_lock */
template<typename Mutex>
class CMutexLock
@@ -43,8 +47,7 @@ public:
#ifdef DEBUG_LOCKCONTENTION
if (!lock.try_lock())
{
- printf("LOCKCONTENTION: %s\n", pszName);
- printf("Locker: %s:%d\n", pszFile, nLine);
+ PrintLockContention(pszName, pszFile, nLine);
#endif
lock.lock();
#ifdef DEBUG_LOCKCONTENTION