@@ -135,15 +135,15 @@ void CoherentStateCache::on_new_block(const api::StateChangeSet& state_changes_s
135
135
}
136
136
137
137
Task<StateCache::ValidationResult> CoherentStateCache::validate_current_root (Transaction& tx) {
138
- StateCache::ValidationResult result {.enabled = true };
138
+ StateCache::ValidationResult validation_result {.enabled = true };
139
139
140
140
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;
142
142
// If the latest version id in the cache is not the same as the db or one below it
143
143
// then the cache will be a new one for the next call so return early
144
144
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 ;
147
147
}
148
148
const auto root = co_await wait_for_root_ready (latest_state_version_id_);
149
149
@@ -178,22 +178,22 @@ Task<StateCache::ValidationResult> CoherentStateCache::validate_current_root(Tra
178
178
179
179
auto [cancelled_1, keys] = co_await compare_cache (cache, /* is_code=*/ false );
180
180
if (cancelled_1) {
181
- result .request_canceled = true ;
182
- co_return result ;
181
+ validation_result .request_canceled = true ;
182
+ co_return validation_result ;
183
183
}
184
- result .state_keys_out_of_sync = std::move (keys);
184
+ validation_result .state_keys_out_of_sync = std::move (keys);
185
185
auto [cancelled_2, code_keys] = co_await compare_cache (code_cache, /* is_code=*/ true );
186
186
if (cancelled_2) {
187
- result .request_canceled = true ;
188
- co_return result ;
187
+ validation_result .request_canceled = true ;
188
+ co_return validation_result ;
189
189
}
190
- result .code_keys_out_of_sync = std::move (code_keys);
190
+ validation_result .code_keys_out_of_sync = std::move (code_keys);
191
191
192
192
if (clear_cache) {
193
193
clear_caches (root);
194
194
}
195
- result .cache_cleared = true ;
196
- co_return result ;
195
+ validation_result .cache_cleared = true ;
196
+ co_return validation_result ;
197
197
}
198
198
199
199
void CoherentStateCache::process_upsert_change (CoherentStateRoot* root, StateVersionId version_id, const AccountChange& change) {
0 commit comments