aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2017-01-24 02:32:52 +0100
committerJorge Timón <jtimon@jtimon.cc>2017-01-31 23:20:26 +0100
commitd45955fa0992639d6c9856a73c5f7599cc14f811 (patch)
treea0a9863ae62314e35fe33f572cda41b9cdfc0d13 /src
parente99f0d7ad443ff72087c6f80e9fab65cace0bf19 (diff)
downloadbitcoin-d45955fa0992639d6c9856a73c5f7599cc14f811.tar.xz
Net: CConnman: Make some methods const
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp6
-rw-r--r--src/net.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp
index df88b12c76..5a5d94cd11 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -754,7 +754,7 @@ const uint256& CNetMessage::GetMessageHash() const
// requires LOCK(cs_vSend)
-size_t CConnman::SocketSendData(CNode *pnode)
+size_t CConnman::SocketSendData(CNode *pnode) const
{
auto it = pnode->vSendMsg.begin();
size_t nSentSize = 0;
@@ -2687,12 +2687,12 @@ int64_t PoissonNextSend(int64_t nNow, int average_interval_seconds) {
return nNow + (int64_t)(log1p(GetRand(1ULL << 48) * -0.0000000000000035527136788 /* -1/2^48 */) * average_interval_seconds * -1000000.0 + 0.5);
}
-CSipHasher CConnman::GetDeterministicRandomizer(uint64_t id)
+CSipHasher CConnman::GetDeterministicRandomizer(uint64_t id) const
{
return CSipHasher(nSeed0, nSeed1).Write(id);
}
-uint64_t CConnman::CalculateKeyedNetGroup(const CAddress& ad)
+uint64_t CConnman::CalculateKeyedNetGroup(const CAddress& ad) const
{
std::vector<unsigned char> vchNetGroup(ad.GetGroup());
diff --git a/src/net.h b/src/net.h
index 0b8efcc882..6228f7b508 100644
--- a/src/net.h
+++ b/src/net.h
@@ -321,7 +321,7 @@ public:
int GetBestHeight() const;
/** Get a unique deterministic randomizer. */
- CSipHasher GetDeterministicRandomizer(uint64_t id);
+ CSipHasher GetDeterministicRandomizer(uint64_t id) const;
unsigned int GetReceiveFloodSize() const;
@@ -342,7 +342,7 @@ private:
void ThreadSocketHandler();
void ThreadDNSAddressSeed();
- uint64_t CalculateKeyedNetGroup(const CAddress& ad);
+ uint64_t CalculateKeyedNetGroup(const CAddress& ad) const;
CNode* FindNode(const CNetAddr& ip);
CNode* FindNode(const CSubNet& subNet);
@@ -357,7 +357,7 @@ private:
NodeId GetNewNodeId();
- size_t SocketSendData(CNode *pnode);
+ size_t SocketSendData(CNode *pnode) const;
//!check is the banlist has unwritten changes
bool BannedSetIsDirty();
//!set the "dirty" flag for the banlist