Skip to content

Commit 6046d6a

Browse files
committed
Use Release build for qemu_runner EEST (#18)
1 parent da69c26 commit 6046d6a

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

qemu_runner/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ xpack-zilkworm-eest:
5959
@[ -d $(BUILD_DIR)/zilkworm ] || mkdir $(BUILD_DIR)/zilkworm
6060
cmake -B$(BUILD_DIR)/zilkworm -S.. \
6161
-DCMAKE_TOOLCHAIN_FILE=$(CMAKE_TOOLCHAIN) \
62-
-DCMAKE_BUILD_TYPE=Debug \
62+
-DCMAKE_BUILD_TYPE=Release \
6363
-DCONAN_PROFILE_HOST=$(CONAN_PROFILE) \
6464
-DCONAN_OUTPUT_FOLDER=$(BUILD_DIR)/conan \
6565
-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE \
@@ -75,7 +75,7 @@ xpack-zilkworm-eest:
7575
xpack-elf-eest: xpack-zilkworm-eest
7676
cmake -B$(BUILD_DIR) -S. \
7777
-DCMAKE_TOOLCHAIN_FILE=$(CMAKE_TOOLCHAIN) \
78-
-DCMAKE_BUILD_TYPE=Debug \
78+
-DCMAKE_BUILD_TYPE=Release \
7979
-DCONAN_PROFILE_HOST=$(CONAN_PROFILE) \
8080
-DCONAN_OUTPUT_FOLDER=$(BUILD_DIR)/conan \
8181
-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE \

zilk_core/core/chain/config.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,11 @@ std::optional<ChainConfig> ChainConfig::from_json(const nlohmann::json& json) no
128128
read_json_config_member(json, "londonBlock", config.london_block);
129129

130130
if (json.contains("burntContract")) {
131-
std::vector<std::pair<BlockNum, evmc::address>> burnt_contract;
132-
for (const auto& item : json["burntContract"].items()) {
133-
const BlockNum from{std::stoull(item.key(), nullptr, 0)};
134-
const evmc::address contract{hex_to_address(item.value().get<std::string>())};
135-
burnt_contract.emplace_back(from, contract);
131+
const auto items = json["burntContract"].items();
132+
auto it = items.begin();
133+
for (size_t i{0}; i < SmallMap<BlockNum, evmc::address>::max_size() && it != items.end(); ++i, ++it) {
134+
config.burnt_contract.emplace_back(std::stoull(it.key(), nullptr, 0), hex_to_address(it.value().get<std::string>()));
136135
}
137-
config.burnt_contract = SmallMap<BlockNum, evmc::address>(burnt_contract.begin(), burnt_contract.end());
138136
}
139137

140138
read_json_config_member(json, "arrowGlacierBlock", config.arrow_glacier_block);

zilk_core/core/common/small_map.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class SmallMap {
3434
template <std::input_iterator InputIt>
3535
constexpr SmallMap(InputIt first, InputIt last) {
3636
for (InputIt it{first}; it != last; ++it) {
37-
// SILKWORM_ASSERT(size_ < maximum_size);
3837
data_[size_++] = *it;
3938
}
4039
sort();
@@ -68,6 +67,15 @@ class SmallMap {
6867
return maximum_size;
6968
}
7069

70+
constexpr bool emplace_back(Key&& key, T&& value) {
71+
if (size_ >= maximum_size) {
72+
return false;
73+
}
74+
data_[size_++] = ValueType{std::forward<Key>(key), std::forward<T>(value)};
75+
sort();
76+
return true;
77+
}
78+
7179
constexpr auto begin() const noexcept {
7280
return data_.begin();
7381
}

0 commit comments

Comments
 (0)