Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.h
| Show First 20 Lines • Show All 187 Lines • ▼ Show 20 Lines | static std::unique_ptr<Processor> MakeProcessor(const ArgsManager &argsman, | ||||
| CConnman *connman, | CConnman *connman, | ||||
| bilingual_str &error); | bilingual_str &error); | ||||
| 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); | ||||
| void addProofToReconcile(const ProofRef &proof); | bool addProofToReconcile(const ProofRef &proof); | ||||
| bool isAccepted(const CBlockIndex *pindex) const; | bool isAccepted(const CBlockIndex *pindex) const; | ||||
| bool isAccepted(const ProofRef &proof) const; | bool isAccepted(const ProofRef &proof) const; | ||||
| int getConfidence(const CBlockIndex *pindex) const; | int getConfidence(const CBlockIndex *pindex) const; | ||||
| int getConfidence(const ProofRef &proof) const; | int getConfidence(const ProofRef &proof) const; | ||||
| // TODO: Refactor the API to remove the dependency on avalanche/protocol.h | // TODO: Refactor the API to remove the dependency on avalanche/protocol.h | ||||
| void sendResponse(CNode *pfrom, Response response) const; | void sendResponse(CNode *pfrom, Response response) const; | ||||
| bool registerVotes(NodeId nodeid, const Response &response, | bool registerVotes(NodeId nodeid, const Response &response, | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | private: | ||||
| /** | /** | ||||
| * Build and return the challenge whose signature is included in the | * Build and return the challenge whose signature is included in the | ||||
| * AVAHELLO message that we send to a peer. | * AVAHELLO message that we send to a peer. | ||||
| */ | */ | ||||
| uint256 buildLocalSighash(CNode *pfrom) const; | uint256 buildLocalSighash(CNode *pfrom) const; | ||||
| bool isWorthPolling(const CBlockIndex *pindex) const | bool isWorthPolling(const CBlockIndex *pindex) const | ||||
| EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
| bool isWorthPolling(const ProofRef &proof) const | |||||
| EXCLUSIVE_LOCKS_REQUIRED(cs_peerManager); | |||||
| friend struct ::avalanche::AvalancheTest; | friend struct ::avalanche::AvalancheTest; | ||||
| }; | }; | ||||
| } // namespace avalanche | } // namespace avalanche | ||||
| #endif // BITCOIN_AVALANCHE_PROCESSOR_H | #endif // BITCOIN_AVALANCHE_PROCESSOR_H | ||||