Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 351 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Attempts to obfuscate tx time through exponentially distributed emitting. | * Attempts to obfuscate tx time through exponentially distributed emitting. | ||||
* Works assuming that a single interval is used. | * Works assuming that a single interval is used. | ||||
* Variable intervals will result in privacy decrease. | * Variable intervals will result in privacy decrease. | ||||
*/ | */ | ||||
int64_t PoissonNextSendInbound(int64_t now, int average_interval_seconds); | int64_t PoissonNextSendInbound(int64_t now, int average_interval_seconds); | ||||
void SetAsmap(std::vector<bool> asmap) { addrman.m_asmap = asmap; } | void SetAsmap(std::vector<bool> asmap) { | ||||
addrman.m_asmap = std::move(asmap); | |||||
} | |||||
private: | private: | ||||
struct ListenSocket { | struct ListenSocket { | ||||
public: | public: | ||||
SOCKET socket; | SOCKET socket; | ||||
inline void AddSocketPermissionFlags(NetPermissionFlags &flags) const { | inline void AddSocketPermissionFlags(NetPermissionFlags &flags) const { | ||||
NetPermissions::AddFlag(flags, m_permissions); | NetPermissions::AddFlag(flags, m_permissions); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 597 Lines • ▼ Show 20 Lines | public: | ||||
void PushBlockHash(const BlockHash &hash) { | void PushBlockHash(const BlockHash &hash) { | ||||
LOCK(cs_inventory); | LOCK(cs_inventory); | ||||
vBlockHashesToAnnounce.push_back(hash); | vBlockHashesToAnnounce.push_back(hash); | ||||
} | } | ||||
void CloseSocketDisconnect(); | void CloseSocketDisconnect(); | ||||
void copyStats(CNodeStats &stats, std::vector<bool> &m_asmap); | void copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap); | ||||
ServiceFlags GetLocalServices() const { return nLocalServices; } | ServiceFlags GetLocalServices() const { return nLocalServices; } | ||||
std::string GetAddrName() const; | std::string GetAddrName() const; | ||||
//! Sets the addrName only if it was not previously set | //! Sets the addrName only if it was not previously set | ||||
void MaybeSetAddrName(const std::string &addrNameIn); | void MaybeSetAddrName(const std::string &addrNameIn); | ||||
}; | }; | ||||
Show All 9 Lines |