Skip to content

Commit e8b08cc

Browse files
committed
More readable "catch-up from version" calculation.
1 parent 55e7412 commit e8b08cc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core-rust/state-manager/src/store/rocks_db.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,13 +2147,12 @@ impl<R: WriteableRocks> StateManagerDatabase<R> {
21472147
}
21482148

21492149
info!("Entity listing indices are enabled.");
2150-
let catchup_from_version = db_context
2150+
let last_processed_state_version = db_context
21512151
.cf(ExtensionsDataCf)
21522152
.get(&ExtensionsDataKey::EntityListingIndicesLastProcessedStateVersion)
21532153
.map(StateVersion::from_be_bytes)
2154-
.unwrap_or(StateVersion::pre_genesis())
2155-
.next()
2156-
.expect("next version");
2154+
.unwrap_or(StateVersion::pre_genesis());
2155+
let catchup_from_version = last_processed_state_version.next().expect("next version");
21572156

21582157
let mut receipts_iter = db_context
21592158
.cf(TransactionReceiptsCf)

0 commit comments

Comments
 (0)