mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-05-14 21:59:37 +00:00
35 lines
900 B
Rust
35 lines
900 B
Rust
use std::time::Duration;
|
|
|
|
use anyhow::Result;
|
|
use common::block::Block;
|
|
use logos_blockchain_key_management_system_service::keys::Ed25519Key;
|
|
|
|
use crate::{
|
|
block_publisher::{
|
|
BlockPublisherTrait, CheckpointSink, FinalizedBlockSink, SequencerCheckpoint,
|
|
},
|
|
config::BedrockConfig,
|
|
};
|
|
|
|
pub type SequencerCoreWithMockClients = crate::SequencerCore<MockBlockPublisher>;
|
|
|
|
#[derive(Clone)]
|
|
pub struct MockBlockPublisher;
|
|
|
|
impl BlockPublisherTrait for MockBlockPublisher {
|
|
async fn new(
|
|
_config: &BedrockConfig,
|
|
_bedrock_signing_key: Ed25519Key,
|
|
_resubmit_interval: Duration,
|
|
_initial_checkpoint: Option<SequencerCheckpoint>,
|
|
_on_checkpoint: CheckpointSink,
|
|
_on_finalized_block: FinalizedBlockSink,
|
|
) -> Result<Self> {
|
|
Ok(Self)
|
|
}
|
|
|
|
async fn publish_block(&self, _block: &Block) -> Result<()> {
|
|
Ok(())
|
|
}
|
|
}
|