Skip to content

Commit 699eac3

Browse files
committed
chore: display last upper synced block slot and root in log
1 parent 7cbb123 commit 699eac3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Diff for: src/indexer/mod.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl Indexer<ReqwestTransport> {
111111
},
112112
};
113113

114-
let last_synced_block = sync_state.and_then(|state| {
114+
let last_synced_block = sync_state.as_ref().and_then(|state| {
115115
match (
116116
state.last_upper_synced_block_root,
117117
state.last_upper_synced_slot,
@@ -125,14 +125,10 @@ impl Indexer<ReqwestTransport> {
125125
}
126126
});
127127

128-
let upper_indexed_block_id = match &last_synced_block {
129-
Some(block) => block.slot.into(),
130-
None => BlockId::Head,
131-
};
132-
133128
info!(
134-
lower_indexed_block_id = current_lower_block_id.to_string(),
135-
upper_indexed_block_id = upper_indexed_block_id.to_string(),
129+
last_lowest_synced_slot = ?current_lower_block_id,
130+
last_upper_synced_block_slot = ?last_synced_block.as_ref().map(|block| block.slot),
131+
last_upper_synced_block_root = ?last_synced_block.as_ref().map(|block| block.root),
136132
"Starting indexer…",
137133
);
138134

0 commit comments

Comments
 (0)