aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 19f4a73bc4..657a39bcff 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -27,6 +27,8 @@
#include <miniupnpc/upnperrors.h>
#endif
+#include <boost/filesystem.hpp>
+
// Dump addresses to peers.dat every 15 minutes (900s)
#define DUMP_ADDRESSES_INTERVAL 900
@@ -1653,7 +1655,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
{
int nErr = WSAGetLastError();
if (nErr == WSAEADDRINUSE)
- strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin Core Daemon is probably already running."), addrBind.ToString());
+ strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin Core is probably already running."), addrBind.ToString());
else
strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString(), nErr, strerror(nErr));
LogPrintf("%s\n", strError);
@@ -1986,9 +1988,9 @@ bool CAddrDB::Read(CAddrMan& addr)
return error("CAddrman::Read() : open failed");
// use file size to size memory buffer
- int fileSize = GetFilesize(filein);
+ int fileSize = boost::filesystem::file_size(pathAddr);
int dataSize = fileSize - sizeof(uint256);
- //Don't try to resize to a negative number if file is small
+ // Don't try to resize to a negative number if file is small
if ( dataSize < 0 ) dataSize = 0;
vector<unsigned char> vchData;
vchData.resize(dataSize);