mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make blockchain tree error results more specific (#7237)
This commit is contained in:
@ -12,12 +12,13 @@ use reth_db::{
|
||||
};
|
||||
use reth_interfaces::{
|
||||
blockchain_tree::{
|
||||
error::InsertBlockError, BlockValidationKind, BlockchainTreeEngine, BlockchainTreeViewer,
|
||||
CanonicalOutcome, InsertPayloadOk,
|
||||
error::{CanonicalError, InsertBlockError},
|
||||
BlockValidationKind, BlockchainTreeEngine, BlockchainTreeViewer, CanonicalOutcome,
|
||||
InsertPayloadOk,
|
||||
},
|
||||
consensus::ForkchoiceState,
|
||||
provider::ProviderResult,
|
||||
RethError, RethResult,
|
||||
RethResult,
|
||||
};
|
||||
use reth_node_api::ConfigureEvmEnv;
|
||||
use reth_primitives::{
|
||||
@ -668,7 +669,7 @@ where
|
||||
self.tree.connect_buffered_blocks_to_canonical_hashes()
|
||||
}
|
||||
|
||||
fn make_canonical(&self, block_hash: &BlockHash) -> RethResult<CanonicalOutcome> {
|
||||
fn make_canonical(&self, block_hash: &BlockHash) -> Result<CanonicalOutcome, CanonicalError> {
|
||||
self.tree.make_canonical(block_hash)
|
||||
}
|
||||
|
||||
@ -714,7 +715,7 @@ where
|
||||
self.tree.find_canonical_ancestor(hash)
|
||||
}
|
||||
|
||||
fn is_canonical(&self, hash: BlockHash) -> Result<bool, RethError> {
|
||||
fn is_canonical(&self, hash: BlockHash) -> Result<bool, ProviderError> {
|
||||
self.tree.is_canonical(hash)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user