Skip to content

Commit

Permalink
fix: review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xDimon committed Dec 30, 2024
1 parent b4528c4 commit 4f843b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/TODO_qtils/bytes_std_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#pragma once

#include <qtils/bytes.hpp>
#include <qtils/byte_utils.hpp>
#include <qtils/bytestr.hpp>

namespace qtils {
struct BytesStdHash {
Expand Down
8 changes: 2 additions & 6 deletions src/jam/empty.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@

#pragma once

#include <scale/scale.hpp>

namespace jam {

/// Special zero-size-type for some things
/// (e.g. unsupported, experimental or empty).
struct Empty {
inline constexpr bool operator==(const Empty &) const {
return true;
}
constexpr bool operator==(const Empty &) const = default;

template <class Stream>
friend inline Stream &operator<<(Stream &s, const Empty &) {
Expand All @@ -28,4 +24,4 @@ namespace jam {
}
};

} // namespace kagome
} // namespace jam
9 changes: 1 addition & 8 deletions test-vectors/safrole/safrole.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <set>
#include <unordered_map>

#include <unordered_map>

#include <TODO_qtils/cxx23/ranges/contains.hpp>
#include <jam/bandersnatch.hpp>
#include <src/jam/tagged.hpp>
Expand Down Expand Up @@ -207,8 +205,7 @@ namespace jam::safrole {
types::ValidatorsData k_tick;
for (auto &validator : k.v) {
k_tick.v.emplace_back(
std::ranges::find(post_offenders, validator.ed25519)
!= post_offenders.end()
qtils::cxx23::ranges::contains(post_offenders, validator.ed25519)
? types::ValidatorData{}
: validator);
}
Expand Down Expand Up @@ -252,10 +249,6 @@ namespace jam::safrole {
gamma_tick_a.insert(gamma_a.begin(), gamma_a.end());
}

std::ranges::for_each(gamma_tick_a, [&](const auto &t) {
fmt::println("old: {}-{}", t.id[0], t.attempt);
});

std::optional<test_vectors::TicketBody> prev_ticket;
for (const auto &ticket_envelope : extrinsic) {
auto &[attempt, ticket_proof] = ticket_envelope;
Expand Down
4 changes: 2 additions & 2 deletions vcpkg-overlay/qtils/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO qdrvm/qtils
REF 9796aad4181553f738d754c3cc4a779e32fa389b
SHA512 ad45fcb1e78f3fb55f8826be016558edf7cd984b2c9327fa566f4f1d8b5db4914fb14d791e3d6b8813d7ec2f2b80d8471d149576134c962a1138374ed68bf69d
REF 0dd35029f54e9a6218ee261b0227ef23762f2d4b
SHA512 fa749d2d489282073e10ef43487a8a98733ec071ebfebe665c8c9692568a15b5542689e4f23aeef5c1442ba6513d8c9563a22169bf0657a619ad01109a84ce0b
)
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_cmake_install()
Expand Down

0 comments on commit 4f843b9

Please sign in to comment.