mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge #9659: Net: Turn some methods and params/variables const
0729102Net: pass interruptMsgProc as const where possible (Jorge Timón)fc7f2ffNet: Make CNetMsgMaker more const (Jorge Timón)d45955fNet: CConnman: Make some methods const (Jorge Timón)
This commit is contained in:
@@ -781,7 +781,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;
|
||||
@@ -2719,12 +2719,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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user