Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | |||||
| // Force DNS seed use ahead of UAHF fork, to ensure peers are found | // Force DNS seed use ahead of UAHF fork, to ensure peers are found | ||||
| // as long as seeders are working. | // as long as seeders are working. | ||||
| // TODO: Change this back to false after the forked network is stable. | // TODO: Change this back to false after the forked network is stable. | ||||
| static const bool DEFAULT_FORCEDNSSEED = true; | static const bool DEFAULT_FORCEDNSSEED = true; | ||||
| static const size_t DEFAULT_MAXRECEIVEBUFFER = 5 * 1000; | static const size_t DEFAULT_MAXRECEIVEBUFFER = 5 * 1000; | ||||
| static const size_t DEFAULT_MAXSENDBUFFER = 1 * 1000; | static const size_t DEFAULT_MAXSENDBUFFER = 1 * 1000; | ||||
| static const ServiceFlags REQUIRED_SERVICES = | static const ServiceFlags REQUIRED_SERVICES = ServiceFlags(NODE_NETWORK); | ||||
| ServiceFlags(NODE_NETWORK | NODE_BITCOIN_CASH); | |||||
| // Default 24-hour ban. | // Default 24-hour ban. | ||||
| // NOTE: When adjusting this, update rpcnet:setban's help ("24h") | // NOTE: When adjusting this, update rpcnet:setban's help ("24h") | ||||
| static const unsigned int DEFAULT_MISBEHAVING_BANTIME = 60 * 60 * 24; | static const unsigned int DEFAULT_MISBEHAVING_BANTIME = 60 * 60 * 24; | ||||
| typedef int64_t NodeId; | typedef int64_t NodeId; | ||||
| struct AddedNodeInfo { | struct AddedNodeInfo { | ||||
| ▲ Show 20 Lines • Show All 469 Lines • ▼ Show 20 Lines | |||||
| /** Information about a peer */ | /** Information about a peer */ | ||||
| class CNode { | class CNode { | ||||
| friend class CConnman; | friend class CConnman; | ||||
| public: | public: | ||||
| // socket | // socket | ||||
| std::atomic<ServiceFlags> nServices; | std::atomic<ServiceFlags> nServices; | ||||
| // Services expected from a peer, otherwise it will be disconnected | |||||
| ServiceFlags nServicesExpected; | ServiceFlags nServicesExpected; | ||||
| SOCKET hSocket; | SOCKET hSocket; | ||||
| // Total size of all vSendMsg entries. | // Total size of all vSendMsg entries. | ||||
| size_t nSendSize; | size_t nSendSize; | ||||
| // Offset inside the first vSendMsg already sent. | // Offset inside the first vSendMsg already sent. | ||||
| size_t nSendOffset; | size_t nSendOffset; | ||||
| uint64_t nSendBytes; | uint64_t nSendBytes; | ||||
| std::deque<std::vector<uint8_t>> vSendMsg; | std::deque<std::vector<uint8_t>> vSendMsg; | ||||
| ▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines | |||||