Skip to content

Commit e270375

Browse files
committedMar 16, 2025·
fix shadowing
1 parent fbd084f commit e270375

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed
 

‎silkworm/db/kv/api/state_cache.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ void CoherentStateCache::on_new_block(const api::StateChangeSet& state_changes_s
135135
}
136136

137137
Task<StateCache::ValidationResult> CoherentStateCache::validate_current_root(Transaction& tx) {
138-
StateCache::ValidationResult result{.enabled = true};
138+
StateCache::ValidationResult validation_result{.enabled = true};
139139

140140
const StateVersionId current_state_version_id = co_await get_db_state_version(tx);
141-
result.latest_state_version_id = current_state_version_id;
141+
validation_result.latest_state_version_id = current_state_version_id;
142142
// If the latest version id in the cache is not the same as the db or one below it
143143
// then the cache will be a new one for the next call so return early
144144
if (current_state_version_id > latest_state_version_id_) {
145-
result.latest_state_behind = true;
146-
co_return result;
145+
validation_result.latest_state_behind = true;
146+
co_return validation_result;
147147
}
148148
const auto root = co_await wait_for_root_ready(latest_state_version_id_);
149149

@@ -178,22 +178,22 @@ Task<StateCache::ValidationResult> CoherentStateCache::validate_current_root(Tra
178178

179179
auto [cancelled_1, keys] = co_await compare_cache(cache, /*is_code=*/false);
180180
if (cancelled_1) {
181-
result.request_canceled = true;
182-
co_return result;
181+
validation_result.request_canceled = true;
182+
co_return validation_result;
183183
}
184-
result.state_keys_out_of_sync = std::move(keys);
184+
validation_result.state_keys_out_of_sync = std::move(keys);
185185
auto [cancelled_2, code_keys] = co_await compare_cache(code_cache, /*is_code=*/true);
186186
if (cancelled_2) {
187-
result.request_canceled = true;
188-
co_return result;
187+
validation_result.request_canceled = true;
188+
co_return validation_result;
189189
}
190-
result.code_keys_out_of_sync = std::move(code_keys);
190+
validation_result.code_keys_out_of_sync = std::move(code_keys);
191191

192192
if (clear_cache) {
193193
clear_caches(root);
194194
}
195-
result.cache_cleared = true;
196-
co_return result;
195+
validation_result.cache_cleared = true;
196+
co_return validation_result;
197197
}
198198

199199
void CoherentStateCache::process_upsert_change(CoherentStateRoot* root, StateVersionId version_id, const AccountChange& change) {

0 commit comments

Comments
 (0)
Please sign in to comment.