Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | void ForEachNodeThen(Callable &&pre, CallableAfter &&post) const { | ||||
} | } | ||||
post(); | post(); | ||||
}; | }; | ||||
// Addrman functions | // Addrman functions | ||||
size_t GetAddressCount() const; | size_t GetAddressCount() const; | ||||
void SetServices(const CService &addr, ServiceFlags nServices); | void SetServices(const CService &addr, ServiceFlags nServices); | ||||
void MarkAddressGood(const CAddress &addr); | void MarkAddressGood(const CAddress &addr); | ||||
void AddNewAddress(const CAddress &addr, const CAddress &addrFrom, | |||||
int64_t nTimePenalty = 0); | |||||
void AddNewAddresses(const std::vector<CAddress> &vAddr, | void AddNewAddresses(const std::vector<CAddress> &vAddr, | ||||
const CAddress &addrFrom, int64_t nTimePenalty = 0); | const CAddress &addrFrom, int64_t nTimePenalty = 0); | ||||
std::vector<CAddress> GetAddresses(); | std::vector<CAddress> GetAddresses(); | ||||
void AddressCurrentlyConnected(const CService &addr); | |||||
// Denial-of-service detection/prevention. The idea is to detect peers that | // Denial-of-service detection/prevention. The idea is to detect peers that | ||||
// are behaving badly and disconnect/ban them, but do it in a | // are behaving badly and disconnect/ban them, but do it in a | ||||
// one-coding-mistake-won't-shatter-the-entire-network way. | // one-coding-mistake-won't-shatter-the-entire-network way. | ||||
// IMPORTANT: There should be nothing I can give a node that it will forward | // IMPORTANT: There should be nothing I can give a node that it will forward | ||||
// on that will make that node's peers drop it. If there is, an attacker can | // on that will make that node's peers drop it. If there is, an attacker can | ||||
// isolate a node and/or try to split the network. Dropping a node for | // isolate a node and/or try to split the network. Dropping a node for | ||||
// sending stuff that is invalid now but might be valid in a later version | // sending stuff that is invalid now but might be valid in a later version | ||||
▲ Show 20 Lines • Show All 620 Lines • Show Last 20 Lines |