[−][src]Trait sp_consensus::block_import::BlockImport
Block import trait.
Associated Types
type Error: Error + Send + 'static
[src]
The error type.
type Transaction
[src]
The transaction type used by the backend.
Required methods
pub fn check_block(
&mut self,
block: BlockCheckParams<B>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockCheckParams<B>
) -> Result<ImportResult, Self::Error>
Check block preconditions.
pub fn import_block(
&mut self,
block: BlockImportParams<B, Self::Transaction>,
cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockImportParams<B, Self::Transaction>,
cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
Import a block.
Cached data can be accessed through the blockchain cache.
Implementations on Foreign Types
impl<B: BlockT, T, E: Error + Send + 'static, Transaction> BlockImport<B> for Arc<T> where
&'r T: BlockImport<B, Error = E, Transaction = Transaction>,
[src]
&'r T: BlockImport<B, Error = E, Transaction = Transaction>,
type Error = E
type Transaction = Transaction
pub fn check_block(
&mut self,
block: BlockCheckParams<B>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockCheckParams<B>
) -> Result<ImportResult, Self::Error>
pub fn import_block(
&mut self,
block: BlockImportParams<B, Transaction>,
cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockImportParams<B, Transaction>,
cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
Implementors
impl<B: BlockT, Transaction> BlockImport<B> for BoxBlockImport<B, Transaction>
[src]
type Error = Error
type Transaction = Transaction
pub fn check_block(
&mut self,
block: BlockCheckParams<B>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockCheckParams<B>
) -> Result<ImportResult, Self::Error>
Check block preconditions.
pub fn import_block(
&mut self,
block: BlockImportParams<B, Transaction>,
cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockImportParams<B, Transaction>,
cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
Import a block.
Cached data can be accessed through the blockchain cache.