@@ -76,10 +76,7 @@ export default async function initCache(context: ResolverContext) {
7676 } ;
7777 MEMORY_CACHE . set ( HASH_RATE_AND_TOTAL_DIFFICULTY_KEY , newValue ) ;
7878 } catch ( err ) {
79- console . error (
80- '[ERROR][CACHE][CONN_TIMEOUT] Failed to get hash rate and total difficulty' ,
81- err ,
82- ) ;
79+ console . error ( '[WARN][CACHE][DB] Failed to get hash rate and total difficulty' , err ) ;
8380 }
8481 }
8582
@@ -94,7 +91,7 @@ export default async function initCache(context: ResolverContext) {
9491 const networkStatistics = await networkRepository . getNetworkStatistics ( ) ;
9592 MEMORY_CACHE . set ( NETWORK_STATISTICS_KEY , networkStatistics ) ;
9693 } catch ( err ) {
97- console . error ( '[ERROR ][CACHE][CONN_TIMEOUT ] Failed to get network statistics' , err ) ;
94+ console . error ( '[WARN ][CACHE][DB ] Failed to get network statistics' , err ) ;
9895 }
9996 }
10097
@@ -109,23 +106,20 @@ export default async function initCache(context: ResolverContext) {
109106 const nodeInfo = await networkRepository . getNodeInfo ( ) ;
110107 MEMORY_CACHE . set ( NODE_INFO_KEY , nodeInfo ) ;
111108 } catch ( err ) {
112- console . error ( '[ERROR ][CACHE][CONN_TIMEOUT ] Failed to get node info' , err ) ;
109+ console . error ( '[WARN ][CACHE][DB ] Failed to get node info' , err ) ;
113110 }
114111 }
115112
116113 /**
117- * Fetches and caches information about the blockchain node
118- *
119- * This includes node version, connectivity status, and other
120- * node-specific information that helps monitor the node's health.
114+ * Fetches and caches information about number of blocks, transactions,
115+ * and total gas used in each chain.
121116 */
122-
123117 async function getCountersOfEachChain ( ) {
124118 try {
125119 const counters = await networkRepository . getCountersOfEachChain ( ) ;
126120 MEMORY_CACHE . set ( COUNTERS_OF_EACH_CHAIN_KEY , counters ) ;
127121 } catch ( err ) {
128- console . error ( '[ERROR ][CACHE][CONN_TIMEOUT ] Failed to get counters of each chain' , err ) ;
122+ console . error ( '[WARN ][CACHE][DB ] Failed to get counters of each chain' , err ) ;
129123 }
130124 }
131125
0 commit comments