Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.h
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | class PeerManager { | ||||
/** | /** | ||||
* Track proof ids to broadcast | * Track proof ids to broadcast | ||||
*/ | */ | ||||
std::unordered_set<ProofId, SaltedProofIdHasher> m_unbroadcast_proofids; | std::unordered_set<ProofId, SaltedProofIdHasher> m_unbroadcast_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 proof callback */ | /** Conflicting proof callback */ | ||||
std::unique_ptr<interfaces::Handler> | std::unique_ptr<interfaces::Handler> | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |