aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp
index e6a066a4e2..3f4017d131 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -445,7 +445,6 @@ void CNode::PushVersion()
{
int nBestHeight = g_signals.GetHeight().get_value_or(0);
- /// when NTP implemented, change to just nTime = GetAdjustedTime()
int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0)));
CAddress addrMe = GetLocalAddress(&addr);
@@ -601,7 +600,7 @@ int CNetMessage::readHeader(const char *pch, unsigned int nBytes)
try {
hdrbuf >> hdr;
}
- catch (const std::exception &) {
+ catch (const std::exception&) {
return -1;
}
@@ -1068,7 +1067,7 @@ void ThreadMapPort()
MilliSleep(20*60*1000); // Refresh every 20 minutes
}
}
- catch (boost::thread_interrupted)
+ catch (const boost::thread_interrupted&)
{
r = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port.c_str(), "TCP", 0);
LogPrintf("UPNP_DeletePortMapping() returned : %d\n", r);
@@ -1854,7 +1853,7 @@ bool CAddrDB::Write(const CAddrMan& addr)
try {
fileout << ssPeers;
}
- catch (std::exception &e) {
+ catch (const std::exception& e) {
return error("%s : Serialize or I/O error - %s", __func__, e.what());
}
FileCommit(fileout.Get());
@@ -1890,7 +1889,7 @@ bool CAddrDB::Read(CAddrMan& addr)
filein.read((char *)&vchData[0], dataSize);
filein >> hashIn;
}
- catch (std::exception &e) {
+ catch (const std::exception& e) {
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
}
filein.fclose();
@@ -1914,7 +1913,7 @@ bool CAddrDB::Read(CAddrMan& addr)
// de-serialize address data into one CAddrMan object
ssPeers >> addr;
}
- catch (std::exception &e) {
+ catch (const std::exception& e) {
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
}