Replacing static network_params with a default inactive node.
This commit is contained in:
parent
0f2c738aff
commit
624674a237
1 changed files with 2 additions and 2 deletions
|
|
@ -440,14 +440,14 @@ int main (int argc, char * const * argv)
|
||||||
}
|
}
|
||||||
else if (vm.count ("debug_profile_kdf"))
|
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 result;
|
||||||
nano::uint256_union salt (0);
|
nano::uint256_union salt (0);
|
||||||
std::string password ("");
|
std::string password ("");
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
auto begin1 (std::chrono::high_resolution_clock::now ());
|
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;
|
(void)success;
|
||||||
auto end1 (std::chrono::high_resolution_clock::now ());
|
auto end1 (std::chrono::high_resolution_clock::now ());
|
||||||
std::cerr << boost::str (boost::format ("Derivation time: %1%us\n") % std::chrono::duration_cast<std::chrono::microseconds> (end1 - begin1).count ());
|
std::cerr << boost::str (boost::format ("Derivation time: %1%us\n") % std::chrono::duration_cast<std::chrono::microseconds> (end1 - begin1).count ());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue