Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/peermanager_tests.cpp
Show All 32 Lines | |||||
} // namespace | } // namespace | ||||
class TestConflictingProofHandler | class TestConflictingProofHandler | ||||
: public PeerManager::ConflictingProofHandler { | : public PeerManager::ConflictingProofHandler { | ||||
public: | public: | ||||
std::shared_ptr<Proof> lastProof; | std::shared_ptr<Proof> lastProof; | ||||
bool lastVote; | bool lastVote; | ||||
void onConflictingProof(const std::shared_ptr<Proof> &proof, | void | ||||
onConflictingProof(const std::shared_ptr<Proof> &proof, | |||||
const std::unordered_set<PeerId> &conflictingPeerIds, | |||||
bool accepted) override { | bool accepted) override { | ||||
lastProof = proof; | lastProof = proof; | ||||
lastVote = accepted; | lastVote = accepted; | ||||
} | } | ||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
BOOST_FIXTURE_TEST_SUITE(peermanager_tests, TestingSetup) | BOOST_FIXTURE_TEST_SUITE(peermanager_tests, TestingSetup) | ||||
▲ Show 20 Lines • Show All 936 Lines • Show Last 20 Lines |