From 6df59acdb7eb9c3b43e76161b4e46c1d15023981 Mon Sep 17 00:00:00 2001 From: Boris Erakhtin Date: Fri, 10 Jan 2025 13:27:54 +0500 Subject: [PATCH] better init --- core/network/impl/synchronizer_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/network/impl/synchronizer_impl.cpp b/core/network/impl/synchronizer_impl.cpp index a2af48b77f..2c53b58a3b 100644 --- a/core/network/impl/synchronizer_impl.cpp +++ b/core/network/impl/synchronizer_impl.cpp @@ -123,7 +123,9 @@ namespace kagome::network { chain_sub_engine_(std::move(chain_sub_engine)), main_pool_handler_{ poolHandlerReadyMake(app_state_manager, main_thread_pool)}, - block_storage_{std::move(block_storage)} { + block_storage_{std::move(block_storage)}, + max_parallel_downloads_{app_config.maxParallelDownloads()}, + random_gen_{std::random_device{}()} { BOOST_ASSERT(block_tree_); BOOST_ASSERT(block_executor_); BOOST_ASSERT(trie_node_db_); @@ -138,8 +140,6 @@ namespace kagome::network { BOOST_ASSERT(block_storage_); sync_method_ = app_config.syncMethod(); - max_parallel_downloads_ = app_config.maxParallelDownloads(); - random_gen_ = std::mt19937(std::random_device{}()); // Register metrics metrics_registry_->registerGaugeFamily(