From a95ca0edc24c65416a86f0ad8b9d318eaafb1316 Mon Sep 17 00:00:00 2001 From: Prasanna Loganathar Date: Fri, 27 May 2022 10:18:55 +0530 Subject: [PATCH] Restore missing ones --- src/validation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 3caf49f20f..14a137122c 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3948,7 +3948,9 @@ static Res PoolSplits(CCustomCSView& view, CAmount& totalBalance, ATTRIBUTES& at return true; }); - const auto nWorkers = std::thread::hardware_concurrency(); + const auto workersMax = std::thread::hardware_concurrency() - 1; + auto nWorkers = workersMax > 2 ? workersMax: 3; + LogPrintf("Pool migration: Migrating balances (count: %d, total: %d, concurrency: %d)..\n", balancesToMigrate.size(), totalAccounts, nWorkers);