diff --git a/src/avalanche/processor.h b/src/avalanche/processor.h --- a/src/avalanche/processor.h +++ b/src/avalanche/processor.h @@ -81,7 +81,8 @@ using BlockVoteMap = std::map; -using ProofVoteMap = std::map; +using ProofVoteMap = + std::map; struct query_timeout {}; diff --git a/src/avalanche/proofcomparator.h b/src/avalanche/proofcomparator.h --- a/src/avalanche/proofcomparator.h +++ b/src/avalanche/proofcomparator.h @@ -15,7 +15,7 @@ /** * Compare proofs by score, then by id in case of equality. */ -struct ProofComparator { +struct ProofComparatorByScore { bool operator()(const Proof &lhs, const Proof &rhs) const { uint32_t scoreLhs = lhs.getScore(); uint32_t scoreRhs = rhs.getScore(); diff --git a/src/avalanche/test/processor_tests.cpp b/src/avalanche/test/processor_tests.cpp --- a/src/avalanche/test/processor_tests.cpp +++ b/src/avalanche/test/processor_tests.cpp @@ -298,7 +298,7 @@ votes.reserve(numItems); // Votes are sorted by high score first - std::sort(items.begin(), items.end(), ProofComparator()); + std::sort(items.begin(), items.end(), ProofComparatorByScore()); for (auto &item : items) { votes.emplace_back(error, item->getId()); } diff --git a/src/avalanche/test/proofcomparator_tests.cpp b/src/avalanche/test/proofcomparator_tests.cpp --- a/src/avalanche/test/proofcomparator_tests.cpp +++ b/src/avalanche/test/proofcomparator_tests.cpp @@ -25,7 +25,7 @@ auto proofMinScore = buildRandomProof(MIN_VALID_PROOF_SCORE); auto proofMaxScore = buildRandomProof(std::numeric_limits::max()); - const ProofComparator comparator; + const ProofComparatorByScore comparator; auto prevProof = proofMinScore; for (size_t i = 0; i < 100; i++) {