Add trace on import block. (#4871)

This commit is contained in:
Marcio Diaz
2020-02-10 13:25:20 +01:00
committed by GitHub
parent 4254fbf56d
commit 6a62ec9c75
+3
View File
@@ -1599,6 +1599,9 @@ impl<B, E, Block, RA> sp_consensus::BlockImport<Block> for &Client<B, E, Block,
mut import_block: BlockImportParams<Block, backend::TransactionFor<B, Block>>,
new_cache: HashMap<CacheKeyId, Vec<u8>>,
) -> Result<ImportResult, Self::Error> {
let span = tracing::span!(tracing::Level::DEBUG, "import_block");
let _enter = span.enter();
if let Some(res) = self.prepare_block_storage_changes(&mut import_block).map_err(|e| {
warn!("Block prepare storage changes error:\n{:?}", e);
ConsensusError::ClientImport(e.to_string())