Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/voterecord.h
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Return if this item is in condition to be polled at the moment. | * Return if this item is in condition to be polled at the moment. | ||||
*/ | */ | ||||
bool shouldPoll() const { return inflight < AVALANCHE_MAX_INFLIGHT_POLL; } | bool shouldPoll() const { return inflight < AVALANCHE_MAX_INFLIGHT_POLL; } | ||||
/** | /** | ||||
* Clear `count` inflight requests. | * Clear `count` inflight requests. | ||||
*/ | */ | ||||
void clearInflightRequest(uint8_t count = 1) { inflight -= count; } | void clearInflightRequest(uint8_t count = 1); | ||||
private: | private: | ||||
/** | /** | ||||
* Add the node to the quorum. | * Add the node to the quorum. | ||||
* Returns true if the node was added, false if the node already was in the | * Returns true if the node was added, false if the node already was in the | ||||
* quorum. | * quorum. | ||||
*/ | */ | ||||
bool addNodeToQuorum(NodeId nodeid); | bool addNodeToQuorum(NodeId nodeid); | ||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_VOTERECORD_H | #endif // BITCOIN_AVALANCHE_VOTERECORD_H |