Skip to content

Commit 7d47b04

Browse files
committed
fix: call blobscan's handling reorg endpoint before resyncing forwarded blocks
1 parent d41a594 commit 7d47b04

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/slots_processor/mod.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,18 @@ impl SlotsProcessor<ReqwestTransport> {
287287
let canonical_block_path =
288288
canonical_block_path.into_iter().rev().collect::<Vec<_>>();
289289

290+
let forwarded_blocks = canonical_block_path
291+
.iter()
292+
.map(|block| block.execution_block_hash)
293+
.collect::<Vec<_>>();
294+
295+
self.context
296+
.blobscan_client()
297+
.handle_reorg(rewinded_blocks.clone(), forwarded_blocks.clone())
298+
.await?;
299+
300+
info!(rewinded_blocks = ?rewinded_blocks, forwarded_blocks = ?forwarded_blocks, "Reorg handled!");
301+
290302
let canonical_block_headers: Vec<BlockHeader> = canonical_block_path
291303
.iter()
292304
.map(|block| block.into())
@@ -302,18 +314,6 @@ impl SlotsProcessor<ReqwestTransport> {
302314
}
303315
}
304316

305-
let forwarded_blocks = canonical_block_path
306-
.iter()
307-
.map(|block| block.execution_block_hash)
308-
.collect::<Vec<_>>();
309-
310-
self.context
311-
.blobscan_client()
312-
.handle_reorg(rewinded_blocks.clone(), forwarded_blocks.clone())
313-
.await?;
314-
315-
info!(rewinded_blocks = ?rewinded_blocks, forwarded_blocks = ?forwarded_blocks, "Reorg handled!");
316-
317317
return Ok(());
318318
}
319319

0 commit comments

Comments
 (0)