Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/peermanager_tests.cpp
Show First 20 Lines • Show All 872 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(proof_accessors) { | ||||
const std::string badProofHex( | const std::string badProofHex( | ||||
"96527eae083f1f24625f049d9e54bb9a2102a93d98bf42ab90cfc0bf9e7c634ed76a7" | "96527eae083f1f24625f049d9e54bb9a2102a93d98bf42ab90cfc0bf9e7c634ed76a7" | ||||
"3e95b02cacfd357b64e4fb6c92e92dd00"); | "3e95b02cacfd357b64e4fb6c92e92dd00"); | ||||
bilingual_str error; | bilingual_str error; | ||||
Proof badProof; | Proof badProof; | ||||
BOOST_CHECK(Proof::FromHex(badProof, badProofHex, error)); | BOOST_CHECK(Proof::FromHex(badProof, badProofHex, error)); | ||||
ProofRegistrationState state; | ProofRegistrationState state; | ||||
BOOST_CHECK( | BOOST_CHECK(!pm.registerProof(ProofRef::make(std::move(badProof)), state)); | ||||
!pm.registerProof(std::make_shared<Proof>(std::move(badProof)), state)); | |||||
BOOST_CHECK(state.GetResult() == ProofRegistrationResult::INVALID); | BOOST_CHECK(state.GetResult() == ProofRegistrationResult::INVALID); | ||||
} | } | ||||
BOOST_FIXTURE_TEST_CASE(conflicting_proof_rescan, NoCoolDownFixture) { | BOOST_FIXTURE_TEST_CASE(conflicting_proof_rescan, NoCoolDownFixture) { | ||||
avalanche::PeerManager pm; | avalanche::PeerManager pm; | ||||
const CKey key = CKey::MakeCompressedKey(); | const CKey key = CKey::MakeCompressedKey(); | ||||
▲ Show 20 Lines • Show All 739 Lines • Show Last 20 Lines |