fuel_core_importer/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#![deny(clippy::arithmetic_side_effects)]
#![deny(clippy::cast_possible_truncation)]
#![deny(unused_crate_dependencies)]
#![deny(warnings)]

use fuel_core_types::services::block_importer::SharedImportResult;

pub mod config;
pub mod importer;
pub mod ports;

pub use config::Config;
pub use importer::Importer;

#[derive(Clone)]
pub struct ImporterResult {
    pub shared_result: SharedImportResult,
    #[cfg(feature = "test-helpers")]
    pub changes: std::sync::Arc<fuel_core_storage::transactional::Changes>,
}

impl core::ops::Deref for ImporterResult {
    type Target = SharedImportResult;

    fn deref(&self) -> &Self::Target {
        &self.shared_result
    }
}

#[cfg(test)]
fuel_core_trace::enable_tracing!();