Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche.h
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | private: | ||||
// Track how many successful votes occured. | // Track how many successful votes occured. | ||||
uint32_t successfulVotes = 0; | uint32_t successfulVotes = 0; | ||||
// Track the nodes which are part of the quorum. | // Track the nodes which are part of the quorum. | ||||
std::array<uint16_t, 8> nodeFilter{{0, 0, 0, 0, 0, 0, 0, 0}}; | std::array<uint16_t, 8> nodeFilter{{0, 0, 0, 0, 0, 0, 0, 0}}; | ||||
public: | public: | ||||
VoteRecord(bool accepted) : confidence(accepted) {} | explicit VoteRecord(bool accepted) : confidence(accepted) {} | ||||
/** | /** | ||||
* Copy semantic | * Copy semantic | ||||
*/ | */ | ||||
VoteRecord(const VoteRecord &other) | VoteRecord(const VoteRecord &other) | ||||
: confidence(other.confidence), votes(other.votes), | : confidence(other.confidence), votes(other.votes), | ||||
consider(other.consider), inflight(other.inflight.load()), | consider(other.consider), inflight(other.inflight.load()), | ||||
successfulVotes(other.successfulVotes), nodeFilter(other.nodeFilter) { | successfulVotes(other.successfulVotes), nodeFilter(other.nodeFilter) { | ||||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | private: | ||||
/** The key used to sign responses. */ | /** The key used to sign responses. */ | ||||
CKey sessionKey; | CKey sessionKey; | ||||
/** Event loop machinery. */ | /** Event loop machinery. */ | ||||
EventLoop eventLoop; | EventLoop eventLoop; | ||||
public: | public: | ||||
AvalancheProcessor(CConnman *connmanIn); | explicit AvalancheProcessor(CConnman *connmanIn); | ||||
~AvalancheProcessor(); | ~AvalancheProcessor(); | ||||
void setQueryTimeoutDuration(std::chrono::milliseconds d) { | void setQueryTimeoutDuration(std::chrono::milliseconds d) { | ||||
queryTimeoutDuration = d; | queryTimeoutDuration = d; | ||||
} | } | ||||
bool addBlockToReconcile(const CBlockIndex *pindex); | bool addBlockToReconcile(const CBlockIndex *pindex); | ||||
bool isAccepted(const CBlockIndex *pindex) const; | bool isAccepted(const CBlockIndex *pindex) const; | ||||
Show All 30 Lines |