Skip to content

Commit

Permalink
Fix minor compiling issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
yarkinwho committed Dec 28, 2023
1 parent c02e8ec commit b2c470d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion silkworm/core/chain/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ static inline void read_json_config_member(const nlohmann::json& json, const std
}
}

static inline void read_json_config_member(const nlohmann::json& json, const std::string& key,
std::optional<evmc_revision>& target) {
if (json.contains(key)) {
target = json[key].get<evmc_revision>();
}
}

nlohmann::json ChainConfig::to_json() const noexcept {
nlohmann::json ret;

Expand Down Expand Up @@ -196,7 +203,7 @@ evmc_revision ChainConfig::revision(const BlockHeader& header) const noexcept {

//TODO: read nonce from header / if header.number==0 return istambul;
if(header.number == 0) {
return *_revision ? _revision : EVMC_ISTANBUL;
return *_revision ? *_revision : EVMC_ISTANBUL;
}

return EVMC_ISTANBUL;
Expand Down

0 comments on commit b2c470d

Please sign in to comment.