pub fn new(storage: S, prune_depth: NumberFor<Block>, best_finalized_block: ComplexBlockId<Block>) -> Self {
		let (best_finalized_entry, unfinalized) = storage.read_meta()
			.and_then(|meta| read_forks(&storage, meta))
			.unwrap_or_else(|error| {
				warn!(target: "db", "Unable to initialize list cache: {}. Restarting", error);
				(None, Vec::new())
			});

		ListCache {
			storage,
			prune_depth,
			best_finalized_block,
			best_finalized_entry,
			unfinalized,
		}
	}
/// Create new db list cache entry.
Create new db list cache entry.
Create new db list cache entry .
pub fn new(storage: S, prune_depth: NumberFor<Block>, best_finalized_block: ComplexBlockId<Block>) -> Self {
		let (best_finalized_entry, unfinalized) = storage.read_meta()
			.and_then(|meta| read_forks(&storage, meta))
			.unwrap_or_else(|error| {
				warn!(target: "db", "Unable to initialize list cache: {}. Restarting", error);
				(None, Vec::new())
			});
		ListCache {
			storage,
			prune_depth,
			best_finalized_block,
			best_finalized_entry,
			unfinalized,
		}
	}
pub fn new ( storage : S , prune_depth : NumberFor < Block > , best_finalized_block : ComplexBlockId < Block > ) -> Self { let ( best_finalized_entry , unfinalized ) = storage . read_meta ( ) . and_then ( | meta | read_forks ( & storage , meta ) ) . unwrap_or_else ( | error | { warn ! ( target " " " " error ) ; ( None , Vec :: new ( ) ) } ) ; ListCache { storage , prune_depth , best_finalized_block , best_finalized_entry , unfinalized , } }
Create new db list cache entry.
Create new db list cache entry .
storage
S
prune_depth
NumberFor<Block>
best_finalized_block
ComplexBlockId<Block>
storage
S
prune_depth
NumberFor<Block>
best_finalized_block
ComplexBlockId<Block>