@@ -76,8 +76,8 @@ 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' ,
79+ console . warn (
80+ '[WARN ][CACHE][HASH_RATE_AND_TOTAL_DIFFICULTY ] Failed to get hash rate and total difficulty' ,
8181 err ,
8282 ) ;
8383 }
@@ -94,7 +94,7 @@ export default async function initCache(context: ResolverContext) {
9494 const networkStatistics = await networkRepository . getNetworkStatistics ( ) ;
9595 MEMORY_CACHE . set ( NETWORK_STATISTICS_KEY , networkStatistics ) ;
9696 } catch ( err ) {
97- console . error ( '[ERROR ][CACHE][CONN_TIMEOUT ] Failed to get network statistics' , err ) ;
97+ console . warn ( '[WARN ][CACHE][NETWORK_STATISTICS ] Failed to get network statistics' , err ) ;
9898 }
9999 }
100100
@@ -109,23 +109,23 @@ export default async function initCache(context: ResolverContext) {
109109 const nodeInfo = await networkRepository . getNodeInfo ( ) ;
110110 MEMORY_CACHE . set ( NODE_INFO_KEY , nodeInfo ) ;
111111 } catch ( err ) {
112- console . error ( '[ERROR ][CACHE][CONN_TIMEOUT ] Failed to get node info' , err ) ;
112+ console . warn ( '[WARN ][CACHE][NODE_INFO ] Failed to get node info' , err ) ;
113113 }
114114 }
115115
116116 /**
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.
117+ * Fetches and caches information about number of blocks, transactions,
118+ * and total gas used in each chain.
121119 */
122-
123120 async function getCountersOfEachChain ( ) {
124121 try {
125122 const counters = await networkRepository . getCountersOfEachChain ( ) ;
126123 MEMORY_CACHE . set ( COUNTERS_OF_EACH_CHAIN_KEY , counters ) ;
127124 } catch ( err ) {
128- console . error ( '[ERROR][CACHE][CONN_TIMEOUT] Failed to get counters of each chain' , err ) ;
125+ console . warn (
126+ '[WARN][CACHE][COUNTERS_OF_EACH_CHAIN] Failed to get counters of each chain' ,
127+ err ,
128+ ) ;
129129 }
130130 }
131131
0 commit comments