small changes

This commit is contained in:
Sergio Chouhy 2026-02-18 12:21:58 -03:00 committed by Daniil Polyakov
parent 80c0356fac
commit c2d4e717e4
3 changed files with 10 additions and 4 deletions

View File

@ -65,7 +65,9 @@ impl IndexerCore {
&self.config.channel_id,
).collect::<Vec<_>>();
info!("Parsed {} L2 blocks", l2_blocks_parsed.len());
let mut l2_blocks_parsed_ids: Vec<_> = l2_blocks_parsed.iter().map(|block| block.header.block_id).collect();
l2_blocks_parsed_ids.sort();
info!("Parsed {} L2 blocks with ids {:?}", l2_blocks_parsed.len(), l2_blocks_parsed_ids);
for l2_block in l2_blocks_parsed {
// State modification, will be updated in future

View File

@ -5,7 +5,7 @@
"is_genesis_random": true,
"max_num_tx_in_block": 20,
"mempool_max_size": 1000,
"block_create_timeout_millis": 2000,
"block_create_timeout_millis": 15000,
"retry_pending_blocks_timeout_millis": 500,
"port": 3040,
"bedrock_config": {

View File

@ -175,7 +175,7 @@ async fn retry_pending_blocks_loop(
loop {
tokio::time::sleep(retry_pending_blocks_timeout).await;
let (pending_blocks, block_settlement_client) = {
let (mut pending_blocks, block_settlement_client) = {
let sequencer_core = seq_core.lock().await;
let client = sequencer_core.block_settlement_client();
let pending_blocks = sequencer_core
@ -184,7 +184,11 @@ async fn retry_pending_blocks_loop(
(pending_blocks, client)
};
for block in &pending_blocks {
let k = 50;
if pending_blocks.len() > k {
pending_blocks.select_nth_unstable_by_key(k, |b| b.header.block_id);
}
for block in pending_blocks.iter().take(k) {
info!(
"Resubmitting pending block with id {}",
block.header.block_id