mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-03-10 06:03:09 +00:00
Merge pull request #380 from logos-blockchain/Pravdyvy/block-sorting-while-resubmit
feat: block ordering while resubmit
This commit is contained in:
commit
9df121704f
@ -173,7 +173,7 @@ async fn retry_pending_blocks(seq_core: &Arc<Mutex<SequencerCore>>) -> Result<()
|
||||
|
||||
use log::debug;
|
||||
|
||||
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
|
||||
@ -182,6 +182,8 @@ async fn retry_pending_blocks(seq_core: &Arc<Mutex<SequencerCore>>) -> Result<()
|
||||
(pending_blocks, client)
|
||||
};
|
||||
|
||||
pending_blocks.sort_by(|block1, block2| block1.header.block_id.cmp(&block2.header.block_id));
|
||||
|
||||
if !pending_blocks.is_empty() {
|
||||
info!(
|
||||
"Resubmitting blocks from {} to {}",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user