Using type inference in a few places for iterators.
This commit is contained in:
parent
d54258102c
commit
c659c8b165
3 changed files with 6 additions and 6 deletions
|
@ -1942,7 +1942,7 @@ int main (int argc, char * const * argv)
|
|||
nano::locked<std::vector<boost::unordered_set<nano::account>>> opened_account_versions_shared (epoch_count);
|
||||
using opened_account_versions_t = decltype (opened_account_versions_shared)::value_type;
|
||||
node->store.account.for_each_par (
|
||||
[&opened_account_versions_shared, epoch_count] (nano::store::read_transaction const & /*unused*/, nano::store::iterator<nano::account, nano::account_info> i, nano::store::iterator<nano::account, nano::account_info> n) {
|
||||
[&opened_account_versions_shared, epoch_count] (nano::store::read_transaction const & /*unused*/, auto i, auto n) {
|
||||
// First cache locally
|
||||
opened_account_versions_t opened_account_versions_l (epoch_count);
|
||||
for (; i != n; ++i)
|
||||
|
@ -1979,7 +1979,7 @@ int main (int argc, char * const * argv)
|
|||
nano::locked<boost::unordered_map<nano::account, std::underlying_type_t<nano::epoch>>> unopened_highest_pending_shared;
|
||||
using unopened_highest_pending_t = decltype (unopened_highest_pending_shared)::value_type;
|
||||
node->store.pending.for_each_par (
|
||||
[&unopened_highest_pending_shared, &opened_accounts] (nano::store::read_transaction const & /*unused*/, nano::store::iterator<nano::pending_key, nano::pending_info> i, nano::store::iterator<nano::pending_key, nano::pending_info> n) {
|
||||
[&unopened_highest_pending_shared, &opened_accounts] (nano::store::read_transaction const & /*unused*/, auto i, auto n) {
|
||||
// First cache locally
|
||||
unopened_highest_pending_t unopened_highest_pending_l;
|
||||
for (; i != n; ++i)
|
||||
|
|
|
@ -749,7 +749,7 @@ void nano::ledger::initialize (nano::generate_cache_flags const & generate_cache
|
|||
if (generate_cache_flags_a.reps || generate_cache_flags_a.account_count || generate_cache_flags_a.block_count)
|
||||
{
|
||||
store.account.for_each_par (
|
||||
[this] (store::read_transaction const & /*unused*/, store::iterator<nano::account, nano::account_info> i, store::iterator<nano::account, nano::account_info> n) {
|
||||
[this] (store::read_transaction const & /*unused*/, auto i, auto n) {
|
||||
uint64_t block_count_l{ 0 };
|
||||
uint64_t account_count_l{ 0 };
|
||||
for (; i != n; ++i)
|
||||
|
@ -763,7 +763,7 @@ void nano::ledger::initialize (nano::generate_cache_flags const & generate_cache
|
|||
});
|
||||
|
||||
store.rep_weight.for_each_par (
|
||||
[this] (store::read_transaction const & /*unused*/, store::iterator<nano::account, nano::uint128_union> i, store::iterator<nano::account, nano::uint128_union> n) {
|
||||
[this] (store::read_transaction const & /*unused*/, auto i, auto n) {
|
||||
nano::rep_weights rep_weights_l{ this->store.rep_weight };
|
||||
for (; i != n; ++i)
|
||||
{
|
||||
|
@ -776,7 +776,7 @@ void nano::ledger::initialize (nano::generate_cache_flags const & generate_cache
|
|||
if (generate_cache_flags_a.cemented_count)
|
||||
{
|
||||
store.confirmation_height.for_each_par (
|
||||
[this] (store::read_transaction const & /*unused*/, store::iterator<nano::account, nano::confirmation_height_info> i, store::iterator<nano::account, nano::confirmation_height_info> n) {
|
||||
[this] (store::read_transaction const & /*unused*/, auto i, auto n) {
|
||||
uint64_t cemented_count_l (0);
|
||||
for (; i != n; ++i)
|
||||
{
|
||||
|
|
|
@ -532,7 +532,7 @@ void nano::test::system::generate_send_existing (nano::node & node_a, std::vecto
|
|||
nano::account account;
|
||||
random_pool::generate_block (account.bytes.data (), sizeof (account.bytes));
|
||||
auto transaction = node_a.ledger.tx_begin_read ();
|
||||
store::iterator<nano::account, nano::account_info> entry (node_a.store.account.begin (transaction, account));
|
||||
auto entry = node_a.store.account.begin (transaction, account);
|
||||
if (entry == node_a.store.account.end ())
|
||||
{
|
||||
entry = node_a.store.account.begin (transaction);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue