43 lines
1.1 KiB
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 logos_blockchain_zone_sdk::sequencer::WithdrawArg;
use crate::{
2026-04-30 11:13:50 +02:00
block_publisher::{
2026-05-27 00:17:26 +03:00
BlockPublisherTrait, CheckpointSink, FinalizedBlockSink, OnDepositEventSink,
OnWithdrawEventSink, SequencerCheckpoint,
2026-04-30 11:13:50 +02:00
},
2026-04-29 14:05:23 +02:00
config::BedrockConfig,
};
2026-04-30 11:13:50 +02:00
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,
2026-04-29 14:05:23 +02:00
_initial_checkpoint: Option<SequencerCheckpoint>,
_on_checkpoint: CheckpointSink,
2026-04-30 11:13:50 +02:00
_on_finalized_block: FinalizedBlockSink,
2026-05-27 00:17:26 +03:00
_on_deposit_event: OnDepositEventSink,
_on_withdraw_event: OnWithdrawEventSink,
) -> Result<Self> {
Ok(Self)
}
async fn publish_block(
&self,
_block: &Block,
_bridge_withdrawals: Vec<WithdrawArg>,
) -> Result<()> {
Ok(())
}
}