nyxd_scraper_shared/modules/
block_module.rs

1// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
2// SPDX-License-Identifier: Apache-2.0
3
4use crate::block_processor::types::FullBlockInformation;
5use crate::error::ScraperError;
6use crate::storage::NyxdScraperTransaction;
7use async_trait::async_trait;
8
9#[async_trait]
10pub trait BlockModule {
11    async fn handle_block(
12        &mut self,
13        block: &FullBlockInformation,
14        storage_tx: &mut dyn NyxdScraperTransaction,
15    ) -> Result<(), ScraperError>;
16}