55 std::set<int>::iterator it =
unkId.end();
88 int blocks,
uint64_t services,
bool checkpointVerified) {
134 if (
goodId.count(
id) == 1) {
158 if (ipToId.count(
ipp)) {
160 if (addr.nTime >
NodeSeconds{std::chrono::seconds{ai.lastTry}} ||
161 ai.services != addr.nServices) {
163 ai.services |= addr.nServices;
175 ai.services = addr.nServices;
192 if (
ourId.size() == 0) {
193 if (
unkId.size() == 0) {
228 while (
ids.size() < max) {
232 for (
auto &
id :
ids) {
void Bad_(const CService &ip, int ban)
void GetIPs_(std::set< CNetAddr > &ips, uint64_t requestedFlags, uint32_t max, const bool *nets)
void Good_(const CService &ip, int clientV, std::string clientSV, int blocks, uint64_t services, bool checkpointVerified)
std::map< CService, int > ipToId
std::map< CService, int64_t > banned
std::map< int, SeederAddrInfo > idToInfo
bool Get_(CServiceResult &ip)
void Add_(const CAddress &addr, bool force)
int Lookup_(const CService &ip)
void Update(bool good, int64_t age, double tau)
A CService with information about it as peer.
NodeSeconds nTime
Always included in serialization, except in the network format on INIT_PROTO_VERSION.
enum Network GetNetwork() const
A combination of a network address (CNetAddr) and a (TCP) port.
int64_t GetIgnoreTime() const
int64_t GetBanTime() const
std::string clientSubVersion
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
int64_t GetTime()
DEPRECATED Use either ClockType::now() or Now<TimePointType>() if a cast is needed.
std::chrono::time_point< NodeClock, std::chrono::seconds > NodeSeconds