chore: make block hash not found a warning (#3234)

This commit is contained in:
Matthias Seitz
2023-06-19 15:23:11 +02:00
committed by GitHub
parent b9c19e82b2
commit 71d6d7b480

View File

@ -28,7 +28,7 @@ use std::{
collections::{BTreeMap, HashMap},
sync::Arc,
};
use tracing::{debug, error, info, instrument, trace};
use tracing::{debug, error, info, instrument, trace, warn};
#[cfg_attr(doc, aquamarine::aquamarine)]
/// Tree of chains and its identifications.
@ -887,7 +887,7 @@ impl<DB: Database, C: Consensus, EF: ExecutorFactory> BlockchainTree<DB, C, EF>
}
let Some(chain_id) = self.block_indices.get_blocks_chain_id(block_hash) else {
error!(target: "blockchain_tree", ?block_hash, "Block hash not found in block indices");
warn!(target: "blockchain_tree", ?block_hash, "Block hash not found in block indices");
// TODO: better error
return Err(BlockExecutionError::BlockHashNotFoundInChain { block_hash: *block_hash }.into())
};