@@ -38,7 +38,6 @@ pub mod commands;
3838pub mod config;
3939pub mod constants;
4040pub mod logging;
41- pub mod statics;
4241pub mod version;
4342
4443mod p2p;
@@ -107,6 +106,12 @@ pub struct NodeContext {
107106
108107 /// Sync state notifications.
109108 pub sync : SyncState ,
109+
110+ /// The time this node was launched.
111+ pub start_instant : std:: time:: SystemTime ,
112+
113+ /// The time this node was launched as a UNIX timestamp.
114+ pub start_instant_unix : u64 ,
110115}
111116
112117/// An active `cuprated` node.
@@ -158,9 +163,6 @@ impl Node {
158163 /// Panics if the database is corrupt, critical services fail to start, or
159164 /// `config.target_max_memory` is unresolved.
160165 pub async fn launch ( config : Config ) -> Self {
161- // Initialize global static `LazyLock` data.
162- statics:: init_lazylock_statics ( ) ;
163-
164166 let fast_sync_hashes = blockchain:: get_fast_sync_hashes ( config. fast_sync , config. network ( ) ) ;
165167
166168 // Initialize the database thread pool.
@@ -225,6 +227,7 @@ impl Node {
225227 let ( blockchain_manager_handle, blockchain_manager_rx) = BlockchainManagerHandle :: new ( ) ;
226228
227229 // Create the node context.
230+ let start_instant = std:: time:: SystemTime :: now ( ) ;
228231 let node_ctx = NodeContext {
229232 network : config. network ( ) ,
230233 fast_sync_hashes,
@@ -234,6 +237,11 @@ impl Node {
234237 blockchain_context : context_svc. clone ( ) ,
235238 txpool_read : txpool_read_handle. clone ( ) ,
236239 sync : sync_state,
240+ start_instant_unix : start_instant
241+ . duration_since ( std:: time:: UNIX_EPOCH )
242+ . unwrap_or_default ( )
243+ . as_secs ( ) ,
244+ start_instant,
237245 } ;
238246
239247 // Start clearnet P2P zone
0 commit comments