fix(pipeline): simplify previous_stage, respect max_block in metrics (#2989)

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
Alexey Shekhirin
2023-06-05 23:59:32 +04:00
committed by GitHub
parent 789e680589
commit 3198af11ae
24 changed files with 96 additions and 128 deletions

View File

@ -5,10 +5,7 @@ use crate::{
Case, Error, Suite,
};
use reth_db::mdbx::test_utils::create_test_rw_db;
use reth_primitives::{
stage::{StageCheckpoint, StageId},
BlockBody, SealedBlock,
};
use reth_primitives::{stage::StageId, BlockBody, SealedBlock};
use reth_provider::Transaction;
use reth_stages::{stages::ExecutionStage, ExecInput, Stage};
use std::{collections::BTreeMap, ffi::OsStr, fs, ops::Deref, path::Path, sync::Arc};
@ -108,9 +105,8 @@ impl Case for BlockchainTestCase {
.execute(
&mut transaction,
ExecInput {
previous_stage: last_block.map(|b| {
(StageId::Other("Dummy"), StageCheckpoint::new(b))
}),
previous_stage: last_block
.map(|b| (StageId::Other("Dummy"), b)),
checkpoint: None,
},
)