Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 684 Lines • ▼ Show 20 Lines | public: | ||||
std::atomic_bool fSuccessfullyConnected; | std::atomic_bool fSuccessfullyConnected; | ||||
std::atomic_bool fDisconnect; | std::atomic_bool fDisconnect; | ||||
// We use fRelayTxes for two purposes - | // We use fRelayTxes for two purposes - | ||||
// a) it allows us to not relay tx invs before receiving the peer's version | // a) it allows us to not relay tx invs before receiving the peer's version | ||||
// message. | // message. | ||||
// b) the peer may tell us in its version message that we should not relay | // b) the peer may tell us in its version message that we should not relay | ||||
// tx invs unless it loads a bloom filter. | // tx invs unless it loads a bloom filter. | ||||
// protected by cs_filter | bool fRelayTxes GUARDED_BY(cs_filter); | ||||
bool fRelayTxes; | |||||
bool fSentAddr; | bool fSentAddr; | ||||
CSemaphoreGrant grantOutbound; | CSemaphoreGrant grantOutbound; | ||||
CCriticalSection cs_filter; | mutable CCriticalSection cs_filter; | ||||
std::unique_ptr<CBloomFilter> pfilter PT_GUARDED_BY(cs_filter); | std::unique_ptr<CBloomFilter> pfilter PT_GUARDED_BY(cs_filter); | ||||
std::atomic<int> nRefCount; | std::atomic<int> nRefCount; | ||||
const uint64_t nKeyedNetGroup; | const uint64_t nKeyedNetGroup; | ||||
std::atomic_bool fPauseRecv; | std::atomic_bool fPauseRecv; | ||||
std::atomic_bool fPauseSend; | std::atomic_bool fPauseSend; | ||||
protected: | protected: | ||||
Show All 20 Lines | public: | ||||
// List of block ids we still have announce. There is no final sorting | // List of block ids we still have announce. There is no final sorting | ||||
// before sending, as they are always sent immediately and in the order | // before sending, as they are always sent immediately and in the order | ||||
// requested. | // requested. | ||||
std::vector<uint256> vInventoryBlockToSend GUARDED_BY(cs_inventory); | std::vector<uint256> vInventoryBlockToSend GUARDED_BY(cs_inventory); | ||||
CCriticalSection cs_inventory; | CCriticalSection cs_inventory; | ||||
std::set<uint256> setAskFor; | std::set<uint256> setAskFor; | ||||
std::multimap<int64_t, CInv> mapAskFor; | std::multimap<int64_t, CInv> mapAskFor; | ||||
int64_t nNextInvSend; | int64_t nNextInvSend; | ||||
// Used for headers announcements - unfiltered blocks to relay. Also | // Used for headers announcements - unfiltered blocks to relay. | ||||
// protected by cs_inventory. | std::vector<uint256> vBlockHashesToAnnounce GUARDED_BY(cs_inventory); | ||||
std::vector<uint256> vBlockHashesToAnnounce; | // Used for BIP35 mempool sending. | ||||
// Used for BIP35 mempool sending, also protected by cs_inventory. | bool fSendMempool GUARDED_BY(cs_inventory); | ||||
bool fSendMempool; | |||||
// Last time a "MEMPOOL" request was serviced. | // Last time a "MEMPOOL" request was serviced. | ||||
std::atomic<int64_t> timeLastMempoolReq; | std::atomic<int64_t> timeLastMempoolReq; | ||||
// Block and TXN accept times | // Block and TXN accept times | ||||
std::atomic<int64_t> nLastBlockTime; | std::atomic<int64_t> nLastBlockTime; | ||||
std::atomic<int64_t> nLastTXTime; | std::atomic<int64_t> nLastTXTime; | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |