Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche.h
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | private: | ||||
std::condition_variable cond_running; | std::condition_variable cond_running; | ||||
public: | public: | ||||
AvalancheProcessor() : stopRequest(false), running(false) {} | AvalancheProcessor() : stopRequest(false), running(false) {} | ||||
~AvalancheProcessor() { stopEventLoop(); } | ~AvalancheProcessor() { stopEventLoop(); } | ||||
bool addBlockToReconcile(const CBlockIndex *pindex); | bool addBlockToReconcile(const CBlockIndex *pindex); | ||||
bool isAccepted(const CBlockIndex *pindex) const; | bool isAccepted(const CBlockIndex *pindex) const; | ||||
bool hasFinalized(const CBlockIndex *pindex) const; | |||||
bool registerVotes(const AvalancheResponse &response); | bool registerVotes(const AvalancheResponse &response, | ||||
std::vector<uint256> &accepted, | |||||
std::vector<uint256> &rejected); | |||||
bool startEventLoop(CScheduler &scheduler); | bool startEventLoop(CScheduler &scheduler); | ||||
bool stopEventLoop(); | bool stopEventLoop(); | ||||
private: | private: | ||||
void runEventLoop(); | void runEventLoop(); | ||||
std::vector<CInv> getInvsForNextPoll() const; | std::vector<CInv> getInvsForNextPoll() const; | ||||
friend struct AvalancheTest; | friend struct AvalancheTest; | ||||
}; | }; | ||||
#endif // BITCOIN_AVALANCHE_H | #endif // BITCOIN_AVALANCHE_H |