39 lines
927 B
Rust
Raw Normal View History

use std::time::Duration;
use anyhow::Result;
use common::block::Block;
use logos_blockchain_key_management_system_service::keys::Ed25519Key;
use url::Url;
use crate::{
block_publisher::BlockPublisherTrait, config::BedrockConfig, indexer_client::IndexerClientTrait,
};
pub type SequencerCoreWithMockClients = crate::SequencerCore<MockBlockPublisher, MockIndexerClient>;
#[derive(Clone)]
pub struct MockBlockPublisher;
impl BlockPublisherTrait for MockBlockPublisher {
async fn new(
_config: &BedrockConfig,
_bedrock_signing_key: Ed25519Key,
_resubmit_interval: Duration,
) -> Result<Self> {
Ok(Self)
}
2026-04-29 10:33:07 +02:00
async fn publish_block(&self, _block: &Block) -> Result<()> {
Ok(())
}
}
#[derive(Copy, Clone)]
pub struct MockIndexerClient;
impl IndexerClientTrait for MockIndexerClient {
async fn new(_indexer_url: &Url) -> Result<Self> {
Ok(Self)
}
}