diff --git a/src/avalanche/test/compactproofs_tests.cpp b/src/avalanche/test/compactproofs_tests.cpp index 462c7b8c0..6fdb1f01f 100644 --- a/src/avalanche/test/compactproofs_tests.cpp +++ b/src/avalanche/test/compactproofs_tests.cpp @@ -1,318 +1,325 @@ // Copyright (c) 2022 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include #include namespace avalanche { namespace { struct TestCompactProofs { static std::vector getShortProofIds(const CompactProofs &cp) { return cp.shortproofids; } static std::vector getPrefilledProofs(const CompactProofs &cp) { return cp.prefilledProofs; } static void addPrefilledProof(CompactProofs &cp, uint32_t index, const ProofRef &proof) { PrefilledProof pp{index, proof}; cp.prefilledProofs.push_back(std::move(pp)); } }; } // namespace } // namespace avalanche using namespace avalanche; // TestingSetup is required for buildRandomProof() BOOST_FIXTURE_TEST_SUITE(compactproofs_tests, TestingSetup) BOOST_AUTO_TEST_CASE(compactproofs_roundtrip) { { CompactProofs cpw; BOOST_CHECK_EQUAL(cpw.size(), 0); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); BOOST_CHECK_NO_THROW(ss << cpw); CompactProofs cpr; BOOST_CHECK_NO_THROW(ss >> cpr); BOOST_CHECK_EQUAL(cpr.size(), 0); BOOST_CHECK_EQUAL(cpr.getKeys().first, cpw.getKeys().first); BOOST_CHECK_EQUAL(cpr.getKeys().second, cpw.getKeys().second); } + CChainState &active_chainstate = + Assert(m_node.chainman)->ActiveChainstate(); + { // Check index boundaries CompactProofs cp; TestCompactProofs::addPrefilledProof( - cp, 0, buildRandomProof(MIN_VALID_PROOF_SCORE)); + cp, 0, buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); TestCompactProofs::addPrefilledProof( cp, std::numeric_limits::max(), - buildRandomProof(MIN_VALID_PROOF_SCORE)); + buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); BOOST_CHECK_NO_THROW(ss << cp); auto prefilledProofs = TestCompactProofs::getPrefilledProofs(cp); BOOST_CHECK_EQUAL(prefilledProofs.size(), 2); BOOST_CHECK_EQUAL(prefilledProofs[0].index, 0); BOOST_CHECK_EQUAL(prefilledProofs[1].index, std::numeric_limits::max()); } auto checkCompactProof = [&](size_t numofProof, size_t numofPrefilledProof) { RadixTree proofs; for (size_t i = 0; i < numofProof; i++) { - BOOST_CHECK(proofs.insert(buildRandomProof(MIN_VALID_PROOF_SCORE))); + BOOST_CHECK(proofs.insert( + buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE))); } CompactProofs cpw(proofs); BOOST_CHECK_EQUAL(cpw.size(), numofProof); uint32_t prefilledProofIndex = 0; for (size_t i = 0; i < numofPrefilledProof; i++) { TestCompactProofs::addPrefilledProof( cpw, prefilledProofIndex++, buildRandomProof( + active_chainstate, GetRand(std::numeric_limits::max()))); } auto prefilledProofs = TestCompactProofs::getPrefilledProofs(cpw); BOOST_CHECK_EQUAL(prefilledProofs.size(), numofPrefilledProof); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); BOOST_CHECK_NO_THROW(ss << cpw); CompactProofs cpr; BOOST_CHECK_NO_THROW(ss >> cpr); BOOST_CHECK_EQUAL(cpr.size(), numofProof + numofPrefilledProof); BOOST_CHECK_EQUAL(cpr.getKeys().first, cpw.getKeys().first); BOOST_CHECK_EQUAL(cpr.getKeys().second, cpw.getKeys().second); auto comparePrefilledProof = [](const PrefilledProof &lhs, const PrefilledProof &rhs) { return lhs.index == rhs.index && lhs.proof->getId() == rhs.proof->getId() && lhs.proof->getSignature() == rhs.proof->getSignature(); }; auto prefilledProofsCpr = TestCompactProofs::getPrefilledProofs(cpr); BOOST_CHECK(std::equal(prefilledProofsCpr.begin(), prefilledProofsCpr.end(), prefilledProofs.begin(), comparePrefilledProof)); auto shortIds = TestCompactProofs::getShortProofIds(cpr); size_t index = 0; proofs.forEachLeaf([&](auto pLeaf) { const ProofId &proofid = pLeaf->getId(); BOOST_CHECK_EQUAL(cpr.getShortID(proofid), cpw.getShortID(proofid)); BOOST_CHECK_EQUAL(cpr.getShortID(proofid), shortIds[index]); ++index; return true; }); }; // No proof at all checkCompactProof(0, 0); // No prefilled proofs checkCompactProof(1000, 0); // Only prefilled proofs checkCompactProof(0, 1000); // Mixed case checkCompactProof(1000, 1000); } BOOST_AUTO_TEST_CASE(compactproofs_overflow) { + CChainState &active_chainstate = + Assert(m_node.chainman)->ActiveChainstate(); { CompactProofs cp; TestCompactProofs::addPrefilledProof( - cp, 0, buildRandomProof(MIN_VALID_PROOF_SCORE)); + cp, 0, buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); TestCompactProofs::addPrefilledProof( - cp, 0, buildRandomProof(MIN_VALID_PROOF_SCORE)); + cp, 0, buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); BOOST_CHECK_EXCEPTION(ss << cp, std::ios_base::failure, HasReason("differential value overflow")); } { CompactProofs cp; TestCompactProofs::addPrefilledProof( - cp, 1, buildRandomProof(MIN_VALID_PROOF_SCORE)); + cp, 1, buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); TestCompactProofs::addPrefilledProof( - cp, 0, buildRandomProof(MIN_VALID_PROOF_SCORE)); + cp, 0, buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); BOOST_CHECK_EXCEPTION(ss << cp, std::ios_base::failure, HasReason("differential value overflow")); } { CompactProofs cp; TestCompactProofs::addPrefilledProof( cp, std::numeric_limits::max(), - buildRandomProof(MIN_VALID_PROOF_SCORE)); + buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); TestCompactProofs::addPrefilledProof( - cp, 0, buildRandomProof(MIN_VALID_PROOF_SCORE)); + cp, 0, buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE)); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); BOOST_CHECK_EXCEPTION(ss << cp, std::ios_base::failure, HasReason("differential value overflow")); } { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); // shortproofidk0, shortproofidk1 ss << uint64_t(0) << uint64_t(0); // shortproofids.size() WriteCompactSize(ss, MAX_SIZE + 1); CompactProofs cp; BOOST_CHECK_EXCEPTION(ss >> cp, std::ios_base::failure, HasReason("ReadCompactSize(): size too large")); } { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); // shortproofidk0, shortproofidk1 ss << uint64_t(0) << uint64_t(0); // shortproofids.size() WriteCompactSize(ss, 0); // prefilledProofs.size() WriteCompactSize(ss, MAX_SIZE + 1); CompactProofs cp; BOOST_CHECK_EXCEPTION(ss >> cp, std::ios_base::failure, HasReason("ReadCompactSize(): size too large")); } { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); // shortproofidk0, shortproofidk1 ss << uint64_t(0) << uint64_t(0); // shortproofids.size() WriteCompactSize(ss, 0); // prefilledProofs.size() WriteCompactSize(ss, 1); // prefilledProofs[0].index WriteCompactSize(ss, MAX_SIZE + 1); // prefilledProofs[0].proof - ss << buildRandomProof(MIN_VALID_PROOF_SCORE); + ss << buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE); CompactProofs cp; BOOST_CHECK_EXCEPTION(ss >> cp, std::ios_base::failure, HasReason("ReadCompactSize(): size too large")); } // Compute the number of MAX_SIZE increment we need to cause an overflow const uint64_t overflow = uint64_t(std::numeric_limits::max()) + 1; // Due to differential encoding, a value of MAX_SIZE bumps the index by // MAX_SIZE + 1 BOOST_CHECK_GE(overflow, MAX_SIZE + 1); const uint64_t overflowIter = overflow / (MAX_SIZE + 1); // Make sure the iteration fits in an uint32_t and is <= MAX_SIZE BOOST_CHECK_LE(overflowIter, std::numeric_limits::max()); BOOST_CHECK_LE(overflowIter, MAX_SIZE); uint32_t remainder = uint32_t(overflow - ((MAX_SIZE + 1) * overflowIter)); { CDataStream ss(SER_DISK, PROTOCOL_VERSION); // shortproofidk0, shortproofidk1 ss << uint64_t(0) << uint64_t(0); // shortproofids.size() WriteCompactSize(ss, 0); // prefilledProofs.size() WriteCompactSize(ss, overflowIter + 1); for (uint32_t i = 0; i < overflowIter; i++) { // prefilledProofs[i].index WriteCompactSize(ss, MAX_SIZE); // prefilledProofs[i].proof - ss << buildRandomProof(MIN_VALID_PROOF_SCORE); + ss << buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE); } // This is the prefilled proof causing the overflow WriteCompactSize(ss, remainder); - ss << buildRandomProof(MIN_VALID_PROOF_SCORE); + ss << buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE); CompactProofs cp; BOOST_CHECK_EXCEPTION(ss >> cp, std::ios_base::failure, HasReason("differential value overflow")); } { CDataStream ss(SER_DISK, PROTOCOL_VERSION); // shortproofidk0, shortproofidk1 ss << uint64_t(0) << uint64_t(0); // shortproofids.size() WriteCompactSize(ss, 1); // shortproofids[0] CustomUintFormatter().Ser(ss, 0u); // prefilledProofs.size() WriteCompactSize(ss, overflowIter + 1); for (uint32_t i = 0; i < overflowIter; i++) { // prefilledProofs[i].index WriteCompactSize(ss, MAX_SIZE); // prefilledProofs[i].proof - ss << buildRandomProof(MIN_VALID_PROOF_SCORE); + ss << buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE); } // This prefilled proof isn't enough to cause the overflow alone, but it // overflows due to the extra shortid. WriteCompactSize(ss, remainder - 1); - ss << buildRandomProof(MIN_VALID_PROOF_SCORE); + ss << buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE); CompactProofs cp; // ss >> cp; BOOST_CHECK_EXCEPTION(ss >> cp, std::ios_base::failure, HasReason("indexes overflowed 32 bits")); } { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); // shortproofidk0, shortproofidk1 ss << uint64_t(0) << uint64_t(0); // shortproofids.size() WriteCompactSize(ss, 0); // prefilledProofs.size() WriteCompactSize(ss, 2); // prefilledProofs[0].index WriteCompactSize(ss, 0); // prefilledProofs[0].proof - ss << buildRandomProof(MIN_VALID_PROOF_SCORE); + ss << buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE); // prefilledProofs[1].index = 1 is differentially encoded, which means // it has an absolute index of 2. This leaves no proof at index 1. WriteCompactSize(ss, 1); // prefilledProofs[1].proof - ss << buildRandomProof(MIN_VALID_PROOF_SCORE); + ss << buildRandomProof(active_chainstate, MIN_VALID_PROOF_SCORE); CompactProofs cp; BOOST_CHECK_EXCEPTION(ss >> cp, std::ios_base::failure, HasReason("non contiguous indexes")); } } BOOST_AUTO_TEST_SUITE_END() diff --git a/src/avalanche/test/delegation_tests.cpp b/src/avalanche/test/delegation_tests.cpp index 75628e0d5..e0233f750 100644 --- a/src/avalanche/test/delegation_tests.cpp +++ b/src/avalanche/test/delegation_tests.cpp @@ -1,202 +1,204 @@ // Copyright (c) 2020 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include #include #include #include using namespace avalanche; BOOST_FIXTURE_TEST_SUITE(delegation_tests, TestingSetup) static void CheckDelegation(const Delegation &dg, const ProofRef &p, const CPubKey &expected_pubkey) { DelegationState state; CPubKey pubkey; BOOST_CHECK(dg.verify(state, pubkey)); BOOST_CHECK(state.GetResult() == DelegationResult::NONE); BOOST_CHECK(pubkey == expected_pubkey); BOOST_CHECK(dg.getProofId() == p->getId()); } BOOST_AUTO_TEST_CASE(verify_random) { auto key = CKey::MakeCompressedKey(); - auto p = buildRandomProof(123456, 1234, key); + auto p = buildRandomProof(Assert(m_node.chainman)->ActiveChainstate(), + 123456, 1234, key); DelegationBuilder dgb(*p); { Delegation dg = dgb.build(); BOOST_CHECK_EQUAL(dg.getId(), p->getId()); CheckDelegation(dg, p, p->getMaster()); } auto l1key = CKey::MakeCompressedKey(); BOOST_CHECK(!dgb.addLevel(l1key, key.GetPubKey())); dgb.addLevel(key, l1key.GetPubKey()); CheckDelegation(dgb.build(), p, l1key.GetPubKey()); auto l2key = CKey::MakeCompressedKey(); BOOST_CHECK(!dgb.addLevel(key, l2key.GetPubKey())); BOOST_CHECK(!dgb.addLevel(l2key, l2key.GetPubKey())); dgb.addLevel(l1key, l2key.GetPubKey()); CheckDelegation(dgb.build(), p, l2key.GetPubKey()); } // Proof master priv: // L4J6gEE4wL9ji2EQbzS5dPMTTsw8LRvcMst1Utij4e3X5ccUSdqW // Proof master pub: // 023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3 // Stake priv: // KydYrKDNsVnY5uhpLyC4UmazuJvUjNoKJhEEv9f1mdK1D5zcnMSM // Stake pub: // 02449fb5237efe8f647d32e8b64f06c22d1d40368eaca2a71ffc6a13ecc8bce680 // Level 1 priv: // KzzLLtiYiyFcTXPWUzywt2yEKk5FxkGbMfKhWgBd4oZdt8t8kk77 // Level 1 pub: // 03e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645ef // Level 2 priv: // KwM6hV6hxZt3Kt4NHMtWQGH5T2SwhpyswodUQC2zmSjg6KWFWkQU // Level 2 pub: // 03aac52f4cfca700e7e9824298e0184755112e32f359c832f5f6ad2ef62a2c024a struct TestVector { std::string name; std::string hex; std::string dgid; std::string pubkey; DelegationResult result; }; BOOST_AUTO_TEST_CASE(deserialization) { std::vector testcases{ {"Empty delegation", "46116afa1abaab88b96c115c248b77c7d8e099565c5fb40731482c6655ca450d21" "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3" "00", "afc74900c1f28b69e466461fb1e0663352da6153be0fcd59280e27f2446391d5", "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3", DelegationResult::NONE}, {"One delegation", "46116afa1abaab88b96c115c248b77c7d8e099565c5fb40731482c6655ca450d21" "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3" "012103e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645e" "f7d51" "2ddbea7c88dcf38412b58374856a466e165797a69321c0928a89c64521f7e2e767c93" "de645ef5125ec901dcd51347787ca29771e7786bbe402d2d5ead0dc", "ffcd49dc98ebdbc90e731a7b0c89939bfe082f15f3aa82aca657176b83669185", "03e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645ef", DelegationResult::NONE}, {"Two delegation", "46116afa1abaab88b96c115c248b77c7d8e099565c5fb40731482c6655ca450d21" "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3" "022103e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645e" "f7d512ddbea7c88dcf38412b58374856a466e165797a69321c0928a89c64521f7e2e7" "67c93de645ef5125ec901dcd51347787ca29771e7786bbe402d2d5ead0dc2103aac52" "f4cfca700e7e9824298e0184755112e32f359c832f5f6ad2ef62a2c024a5cddd0ffe8" "4e12e4bf49e4c0af7c8548e618a24e12495d659f5ba75e114e1526a618aa305b1e69b" "f6ae20b2557999f2e3fec25d5f2271f8b9de0d06ba7344550", "a3f98e6b5ec330219493d109e5c11ed8e302315df4604b5462e9fb80cb0fde89", "03aac52f4cfca700e7e9824298e0184755112e32f359c832f5f6ad2ef62a2c024a", DelegationResult::NONE}, {"Invalid pubkey", "46116afa1abaab88b96c115c248b77c7d8e099565c5fb40731482c6655ca450d21" "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3012" "103e49f9df53de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645ef7d" "512ddbea7c88dcf38412b58374856a466e165797a69321c0928a89c64521f7e2e767c" "93de645ef5125ec901dcd51347787ca29771e7786bbe402d2d5ead0dc", "af7e82716489c3cf3f361d449ed815112ff619f7fc34a4803bd958c68d1e2684", "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3", DelegationResult::INVALID_SIGNATURE}, {"Invalid signature", "46116afa1abaab88b96c115c248b77c7d8e099565c5fb40731482c6655ca450d21" "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3" "012103e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645e" "f7d512ddbea7c88dcf38412c58374856a466e165797a69321c0928a89c64521f7e2e7" "67c93de645ef5125ec901dcd51347787ca29771e7786bbe402d2d5ead0dc", "ffcd49dc98ebdbc90e731a7b0c89939bfe082f15f3aa82aca657176b83669185", "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3", DelegationResult::INVALID_SIGNATURE}, {"Second invalid key", "46116afa1abaab88b96c115c248b77c7d8e099565c5fb40731482c6655ca450d21" "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3" "022103e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645e" "f7d512ddbea7c88dcf38412b58374856a466e165797a69321c0928a89c64521f7e2e7" "67c93de645ef5125ec901dcd51347787ca29771e7786bbe402d2d5ead0dc2103aac52" "f4dfca700e7e9824298e0184755112e32f359c832f5f6ad2ef62a2c024a5cddd0ffe8" "4e12e4bf49e4c0af7c8548e618a24e12495d659f5ba75e114e1526a618aa305b1e69b" "f6ae20b2557999f2e3fec25d5f2271f8b9de0d06ba7344550", "b474512f71a3f5a6e94cc3b958fd658ece0d0632ace58c8c8f9f65c2b9ad5fad", "03e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645ef", DelegationResult::INVALID_SIGNATURE}, {"Second invalid signature", "46116afa1abaab88b96c115c248b77c7d8e099565c5fb40731482c6655ca450d21" "023beefdde700a6bc02036335b4df141c8bc67bb05a971f5ac2745fd683797dde3" "022103e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645e" "f7d512ddbea7c88dcf38412b58374856a466e165797a69321c0928a89c64521f7e2e7" "67c93de645ef5125ec901dcd51347787ca29771e7786bbe402d2d5ead0dc2103aac52" "f4cfca700e7e9824298e0184755112e32f359c832f5f6ad2ef62a2c024a5cddd0ffe8" "4e12e4bf49e4c0af7c8548e618a24e12495d659f5ba75e114e1526a618aa305b1e69b" "f6ae20b2557999f2e3fec25d5f2271f8b9de0d06ba7344551", "a3f98e6b5ec330219493d109e5c11ed8e302315df4604b5462e9fb80cb0fde89", "03e49f9df52de2dea81cf7838b82521b69f2ea360f1c4eed9e6c89b7d0f9e645ef", DelegationResult::INVALID_SIGNATURE}, }; for (auto &c : testcases) { Delegation dg; bilingual_str error; BOOST_CHECK(Delegation::FromHex(dg, c.hex, error)); BOOST_CHECK_EQUAL(dg.getId(), DelegationId::fromHex(c.dgid)); DelegationState state; CPubKey pubkey; BOOST_CHECK_EQUAL(dg.verify(state, pubkey), c.result == DelegationResult::NONE); BOOST_CHECK(state.GetResult() == c.result); BOOST_CHECK(pubkey == CPubKey(ParseHex(c.pubkey))); } } BOOST_AUTO_TEST_CASE(level_limit) { auto proofKey = CKey::MakeCompressedKey(); - auto p = buildRandomProof(123456, 1234, proofKey); + auto p = buildRandomProof(Assert(m_node.chainman)->ActiveChainstate(), + 123456, 1234, proofKey); DelegationBuilder dgb(*p); CKey delegatorKey = proofKey; for (size_t i = 0; i < MAX_DELEGATION_LEVELS; i++) { CKey delegatedKey = CKey::MakeCompressedKey(); BOOST_CHECK(dgb.addLevel(delegatorKey, delegatedKey.GetPubKey())); delegatorKey = delegatedKey; } Delegation dgGood = dgb.build(); // Up to MAX_DELEGATION_LEVELS the delegation is verified valid CheckDelegation(dgGood, p, delegatorKey.GetPubKey()); // Let's add one more delegation level DelegationBuilder dgb2(dgGood); CKey delegatedKey = CKey::MakeCompressedKey(); BOOST_CHECK(dgb2.addLevel(delegatorKey, delegatedKey.GetPubKey())); Delegation dgBad = dgb2.build(); // The delegation is now expected to fail due to too many levels DelegationState state; CPubKey auth; BOOST_CHECK(!dgBad.verify(state, auth)); BOOST_CHECK(state.GetResult() == DelegationResult::TOO_MANY_LEVELS); } BOOST_AUTO_TEST_SUITE_END() diff --git a/src/avalanche/test/peermanager_tests.cpp b/src/avalanche/test/peermanager_tests.cpp index f7863feaa..6692addcd 100644 --- a/src/avalanche/test/peermanager_tests.cpp +++ b/src/avalanche/test/peermanager_tests.cpp @@ -1,1966 +1,1996 @@ // Copyright (c) 2020 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include #include #include