@@ -9,9 +9,8 @@ use cuprate_types::{
9
9
} ;
10
10
11
11
use crate :: {
12
- ExtendedConsensusError ,
13
- __private:: Database ,
14
- context:: { difficulty:: DifficultyCache , rx_vms:: RandomXVm , weight:: BlockWeightsCache } ,
12
+ ContextCacheError , __private:: Database , difficulty:: DifficultyCache , rx_vms:: RandomXVm ,
13
+ weight:: BlockWeightsCache ,
15
14
} ;
16
15
17
16
pub ( crate ) mod sealed {
@@ -38,7 +37,7 @@ pub struct AltChainContextCache {
38
37
pub chain_height : usize ,
39
38
/// The top hash of the alt chain.
40
39
pub top_hash : [ u8 ; 32 ] ,
41
- /// The [`ChainID `] of the alt chain.
40
+ /// The [`ChainId `] of the alt chain.
42
41
pub chain_id : Option < ChainId > ,
43
42
/// The parent [`Chain`] of this alt chain.
44
43
pub parent_chain : Chain ,
@@ -98,7 +97,7 @@ impl AltChainMap {
98
97
& mut self ,
99
98
prev_id : [ u8 ; 32 ] ,
100
99
database : D ,
101
- ) -> Result < Box < AltChainContextCache > , ExtendedConsensusError > {
100
+ ) -> Result < Box < AltChainContextCache > , ContextCacheError > {
102
101
if let Some ( cache) = self . alt_cache_map . remove ( & prev_id) {
103
102
return Ok ( cache) ;
104
103
}
@@ -133,7 +132,7 @@ pub(crate) async fn get_alt_chain_difficulty_cache<D: Database + Clone>(
133
132
prev_id : [ u8 ; 32 ] ,
134
133
main_chain_difficulty_cache : & DifficultyCache ,
135
134
mut database : D ,
136
- ) -> Result < DifficultyCache , ExtendedConsensusError > {
135
+ ) -> Result < DifficultyCache , ContextCacheError > {
137
136
// find the block with hash == prev_id.
138
137
let BlockchainResponse :: FindBlock ( res) = database
139
138
. ready ( )
@@ -180,7 +179,7 @@ pub(crate) async fn get_alt_chain_weight_cache<D: Database + Clone>(
180
179
prev_id : [ u8 ; 32 ] ,
181
180
main_chain_weight_cache : & BlockWeightsCache ,
182
181
mut database : D ,
183
- ) -> Result < BlockWeightsCache , ExtendedConsensusError > {
182
+ ) -> Result < BlockWeightsCache , ContextCacheError > {
184
183
// find the block with hash == prev_id.
185
184
let BlockchainResponse :: FindBlock ( res) = database
186
185
. ready ( )
0 commit comments