Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 741 Lines • ▼ Show 20 Lines | public: | ||||
// flood relay | // flood relay | ||||
std::vector<CAddress> vAddrToSend; | std::vector<CAddress> vAddrToSend; | ||||
CRollingBloomFilter addrKnown; | CRollingBloomFilter addrKnown; | ||||
bool fGetAddr{false}; | bool fGetAddr{false}; | ||||
int64_t nNextAddrSend GUARDED_BY(cs_sendProcessing){0}; | int64_t nNextAddrSend GUARDED_BY(cs_sendProcessing){0}; | ||||
int64_t nNextLocalAddrSend GUARDED_BY(cs_sendProcessing){0}; | int64_t nNextLocalAddrSend GUARDED_BY(cs_sendProcessing){0}; | ||||
const bool m_addr_relay_peer; | |||||
bool IsAddrRelayPeer() const { return m_addr_relay_peer; } | |||||
// List of block ids we still have to announce. | // List of block ids we still have to announce. | ||||
// There is no final sorting before sending, as they are always sent | // There is no final sorting before sending, as they are always sent | ||||
// immediately and in the order requested. | // immediately and in the order requested. | ||||
std::vector<BlockHash> vInventoryBlockToSend GUARDED_BY(cs_inventory); | std::vector<BlockHash> vInventoryBlockToSend GUARDED_BY(cs_inventory); | ||||
RecursiveMutex cs_inventory; | RecursiveMutex cs_inventory; | ||||
struct TxRelay { | struct TxRelay { | ||||
TxRelay() { pfilter = std::make_unique<CBloomFilter>(); } | TxRelay() { pfilter = std::make_unique<CBloomFilter>(); } | ||||
Show All 24 Lines | struct TxRelay { | ||||
// Minimum fee rate with which to filter inv's to this node | // Minimum fee rate with which to filter inv's to this node | ||||
Amount minFeeFilter GUARDED_BY(cs_feeFilter){Amount::zero()}; | Amount minFeeFilter GUARDED_BY(cs_feeFilter){Amount::zero()}; | ||||
Amount lastSentFeeFilter{Amount::zero()}; | Amount lastSentFeeFilter{Amount::zero()}; | ||||
int64_t nextSendTimeFeeFilter{0}; | int64_t nextSendTimeFeeFilter{0}; | ||||
}; | }; | ||||
// m_tx_relay == nullptr if we're not relaying transactions with this peer | // m_tx_relay == nullptr if we're not relaying transactions with this peer | ||||
std::unique_ptr<TxRelay> m_tx_relay; | std::unique_ptr<TxRelay> m_tx_relay; | ||||
// Used for headers announcements - unfiltered blocks to relay | // Used for headers announcements - unfiltered blocks to relay | ||||
std::vector<BlockHash> vBlockHashesToAnnounce GUARDED_BY(cs_inventory); | std::vector<BlockHash> vBlockHashesToAnnounce GUARDED_BY(cs_inventory); | ||||
// Block and TXN accept times | // Block and TXN accept times | ||||
std::atomic<int64_t> nLastBlockTime{0}; | std::atomic<int64_t> nLastBlockTime{0}; | ||||
std::atomic<int64_t> nLastTXTime{0}; | std::atomic<int64_t> nLastTXTime{0}; | ||||
// Ping time measurement: | // Ping time measurement: | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |