mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #4985
808a1f1e
wallet2: cut down on the number of useless derivation threads (moneromooo-monero)
This commit is contained in:
commit
63b5c933ef
@ -2193,7 +2193,6 @@ void wallet2::process_parsed_blocks(uint64_t start_height, const std::vector<cry
|
|||||||
const cryptonote::account_keys &keys = m_account.get_keys();
|
const cryptonote::account_keys &keys = m_account.get_keys();
|
||||||
|
|
||||||
auto gender = [&](wallet2::is_out_data &iod) {
|
auto gender = [&](wallet2::is_out_data &iod) {
|
||||||
boost::unique_lock<hw::device> hwdev_lock(hwdev);
|
|
||||||
if (!hwdev.generate_key_derivation(iod.pkey, keys.m_view_secret_key, iod.derivation))
|
if (!hwdev.generate_key_derivation(iod.pkey, keys.m_view_secret_key, iod.derivation))
|
||||||
{
|
{
|
||||||
MWARNING("Failed to generate key derivation from tx pubkey, skipping");
|
MWARNING("Failed to generate key derivation from tx pubkey, skipping");
|
||||||
@ -2202,12 +2201,16 @@ void wallet2::process_parsed_blocks(uint64_t start_height, const std::vector<cry
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto &slot: tx_cache_data)
|
for (size_t i = 0; i < tx_cache_data.size(); ++i)
|
||||||
{
|
{
|
||||||
for (auto &iod: slot.primary)
|
tpool.submit(&waiter, [&hwdev, &gender, &tx_cache_data, i]() {
|
||||||
tpool.submit(&waiter, [&gender, &iod]() { gender(iod); }, true);
|
auto &slot = tx_cache_data[i];
|
||||||
for (auto &iod: slot.additional)
|
boost::unique_lock<hw::device> hwdev_lock(hwdev);
|
||||||
tpool.submit(&waiter, [&gender, &iod]() { gender(iod); }, true);
|
for (auto &iod: slot.primary)
|
||||||
|
gender(iod);
|
||||||
|
for (auto &iod: slot.additional)
|
||||||
|
gender(iod);
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
waiter.wait(&tpool);
|
waiter.wait(&tpool);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user