Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/sessions_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
iceseer committed Apr 15, 2024
2 parents 10da38f + fe6dec5 commit 43371a6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmake/toolchain/flags/sanitize_address.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(FLAGS
-fsanitize-address-use-after-scope
-fno-omit-frame-pointer
-g
-O1
-O0
-DNDEBUG
)
foreach(FLAG IN LISTS FLAGS)
Expand Down
16 changes: 8 additions & 8 deletions core/parachain/validator/fragment_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ namespace kagome::parachain::fragment {
depths.bits.resize(max_depth + 1);

auto process_parent_pointer = [&](const NodePointer &parent_pointer) {
const auto &[modifications, child_depth, earliest_rp] = visit_in_place(
const auto [modifications, child_depth, earliest_rp] = visit_in_place(
parent_pointer,
[&](const NodePointerRoot &)
-> std::tuple<
Expand All @@ -980,7 +980,7 @@ namespace kagome::parachain::fragment {
std::reference_wrapper<const RelayChainBlockInfo>> {
return std::make_tuple(ConstraintModifications{},
size_t{0ull},
scope.earliestRelayParent());
std::cref(scope.earliestRelayParent()));
},
[&](const NodePointerStorage &ptr)
-> std::tuple<
Expand All @@ -989,15 +989,15 @@ namespace kagome::parachain::fragment {
std::reference_wrapper<const RelayChainBlockInfo>> {
const auto &node = nodes[ptr];
if (auto opt_rcbi = scope.ancestorByHash(node.relayParent())) {
return std::make_tuple(node.cumulative_modifications,
size_t(node.depth + 1),
opt_rcbi->get());
return std::make_tuple(
node.cumulative_modifications, node.depth + 1, *opt_rcbi);
} else {
if (auto r =
scope.getPendingAvailability(node.candidate_hash)) {
return std::make_tuple(node.cumulative_modifications,
size_t(node.depth + 1),
scope.earliestRelayParent());
return std::make_tuple(
node.cumulative_modifications,
node.depth + 1,
std::cref(scope.earliestRelayParent()));
}
UNREACHABLE;
}
Expand Down
6 changes: 5 additions & 1 deletion core/runtime/wasm_edge/module_factory_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,12 @@ namespace kagome::runtime::wasm_edge {
const override {
StoreContext store = WasmEdge_StoreCreate();

auto env_name = WasmEdge_StringCreateByCString("env");

auto host_instance = std::make_shared<ModuleInstanceContext>(
WasmEdge_ModuleInstanceCreate(WasmEdge_StringCreateByCString("env")));
WasmEdge_ModuleInstanceCreate(env_name));

WasmEdge_StringDelete(env_name);

std::shared_ptr<MemoryProvider> memory_provider;
if (memory_type_) {
Expand Down
4 changes: 2 additions & 2 deletions test/core/parachain/prospective_parachains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,11 @@ class ProspectiveParachainsTest : public testing::Test {
}
}

std::ignore =
ASSERT_OUTCOME_SUCCESS_TRY(
prospective_parachain_->onActiveLeavesUpdate(network::ExViewRef{
.new_head = {update.new_head},
.lost = update.lost,
});
}));
auto resp = prospective_parachain_->answerMinimumRelayParentsRequest(hash);
std::sort(resp.begin(), resp.end(), [](const auto &l, const auto &r) {
return l.first < r.first;
Expand Down

0 comments on commit 43371a6

Please sign in to comment.