Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.h
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | class PeerManager { | ||||
/** | /** | ||||
* Track proof ids from conflicting proofs | * Track proof ids from conflicting proofs | ||||
*/ | */ | ||||
std::unordered_set<ProofId, SaltedProofIdHasher> m_conflicting_proofids; | std::unordered_set<ProofId, SaltedProofIdHasher> m_conflicting_proofids; | ||||
public: | public: | ||||
class ConflictingProofHandler { | class ConflictingProofHandler { | ||||
public: | public: | ||||
virtual void onConflictingProof(const std::shared_ptr<Proof> &proof, | virtual void | ||||
onConflictingProof(const std::shared_ptr<Proof> &proof, | |||||
const std::unordered_set<PeerId> &conflictingPeerIds, | |||||
bool accepted) {} | bool accepted) {} | ||||
virtual ~ConflictingProofHandler() {} | virtual ~ConflictingProofHandler() {} | ||||
}; | }; | ||||
std::unordered_set<std::shared_ptr<ConflictingProofHandler>> | std::unordered_set<std::shared_ptr<ConflictingProofHandler>> | ||||
conflictingProofHandlers; | conflictingProofHandlers; | ||||
/** Conflicting proofs API */ | /** Conflicting proofs API */ | ||||
std::unique_ptr<interfaces::Handler> | std::unique_ptr<interfaces::Handler> | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |