diff --git a/client/db/src/light.rs b/client/db/src/light.rs index 7a79885fad35f..7550daf894883 100644 --- a/client/db/src/light.rs +++ b/client/db/src/light.rs @@ -63,6 +63,8 @@ pub struct LightStorage { meta: RwLock, Block::Hash>>, cache: Arc>, header_metadata_cache: HeaderMetadataCache, + + #[cfg(not(target_os = "unknown"))] io_stats: FrozenForDuration, } @@ -102,6 +104,7 @@ impl LightStorage meta: RwLock::new(meta), cache: Arc::new(DbCacheSync(RwLock::new(cache))), header_metadata_cache: HeaderMetadataCache::default(), + #[cfg(not(target_os = "unknown"))] io_stats: FrozenForDuration::new(std::time::Duration::from_secs(1), kvdb::IoStats::empty()), }) } @@ -558,6 +561,7 @@ impl LightBlockchainStorage for LightStorage Some(self.cache.clone()) } + #[cfg(not(target_os = "unknown"))] fn usage_info(&self) -> Option { use sc_client_api::{MemoryInfo, IoInfo}; @@ -579,6 +583,11 @@ impl LightBlockchainStorage for LightStorage } }) } + + #[cfg(target_os = "unknown")] + fn usage_info(&self) -> Option { + None + } } /// Build the key for inserting header-CHT at given block.