64 6364136223846793005 * uint64_t(nodeid) + 1442695040888963407;
66 const uint64_t r2 = 11400714819323198485ull * (nodeid ^
seed);
68 const uint16_t h = (r1 + r2) >> 48;
73 for (
size_t i = 1; i <
nodeFilter.size(); i++) {
uint32_t countBits(uint32_t v)
bool error(const char *fmt, const Args &...args)
uint16_t getConfidence() const
void clearInflightRequest(uint8_t count=1)
Clear count inflight requests.
std::atomic< uint8_t > inflight
bool registerVote(NodeId nodeid, uint32_t error)
Register a new vote for an item and update confidence accordingly.
std::array< uint16_t, 8 > nodeFilter
bool addNodeToQuorum(NodeId nodeid)
Add the node to the quorum.
bool registerPoll() const
Register that a request is being made regarding that item.
bool isAccepted() const
Vote accounting facilities.
static constexpr int AVALANCHE_MAX_INFLIGHT_POLL
How many inflight requests can exist for one item.
static constexpr int AVALANCHE_FINALIZATION_SCORE
Finalization score.