Skip to content

Commit 7cbb123

Browse files
committed
feat: pass last synced block root and slot to synchronizer when starting indexer
1 parent a3b8a8c commit 7cbb123

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Diff for: src/indexer/mod.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,17 @@ impl Indexer<ReqwestTransport> {
112112
};
113113

114114
let last_synced_block = sync_state.and_then(|state| {
115-
state
116-
.last_upper_synced_slot
117-
.map(|last_upper_synced_slot| BlockHeader {
118-
slot: last_upper_synced_slot,
119-
root: B256::ZERO,
115+
match (
116+
state.last_upper_synced_block_root,
117+
state.last_upper_synced_slot,
118+
) {
119+
(Some(root), Some(slot)) => Some(BlockHeader {
120120
parent_root: B256::ZERO,
121-
})
121+
root,
122+
slot,
123+
}),
124+
_ => None,
125+
}
122126
});
123127

124128
let upper_indexed_block_id = match &last_synced_block {

0 commit comments

Comments
 (0)