From 624674a237383d389a61211b8a856dcd8411aa90 Mon Sep 17 00:00:00 2001 From: clemahieu Date: Wed, 4 Aug 2021 00:46:02 +0100 Subject: [PATCH] Replacing static network_params with a default inactive node. --- nano/nano_node/entry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/nano_node/entry.cpp b/nano/nano_node/entry.cpp index 4c9900cf3..a5585ca58 100644 --- a/nano/nano_node/entry.cpp +++ b/nano/nano_node/entry.cpp @@ -440,14 +440,14 @@ int main (int argc, char * const * argv) } else if (vm.count ("debug_profile_kdf")) { - nano::network_params network_params; + auto inactive_node = nano::default_inactive_node (data_path, vm); nano::uint256_union result; nano::uint256_union salt (0); std::string password (""); while (true) { auto begin1 (std::chrono::high_resolution_clock::now ()); - auto success (argon2_hash (1, network_params.kdf_work, 1, password.data (), password.size (), salt.bytes.data (), salt.bytes.size (), result.bytes.data (), result.bytes.size (), NULL, 0, Argon2_d, 0x10)); + auto success (argon2_hash (1, inactive_node->node->network_params.kdf_work, 1, password.data (), password.size (), salt.bytes.data (), salt.bytes.size (), result.bytes.data (), result.bytes.size (), NULL, 0, Argon2_d, 0x10)); (void)success; auto end1 (std::chrono::high_resolution_clock::now ()); std::cerr << boost::str (boost::format ("Derivation time: %1%us\n") % std::chrono::duration_cast (end1 - begin1).count ());