Fix shadowing variables

This commit is contained in:
seelabs
2019-08-13 14:26:02 -07:00
parent 014df67fed
commit b9e73b4852
55 changed files with 460 additions and 444 deletions

View File

@@ -507,9 +507,9 @@ TxQ::tryClearAccountQueue(Application& app, OpenView& view,
auto const totalFeeLevelPaid = std::accumulate(beginTxIter, endTxIter,
feeLevelPaid,
[](auto const& total, auto const& tx)
[](auto const& total, auto const& txn)
{
return total + tx.second.feeLevel;
return total + txn.second.feeLevel;
});
// This transaction did not pay enough, so fall back to the normal process.
@@ -1084,12 +1084,12 @@ TxQ::apply(Application& app, OpenView& view,
auto endTotal = std::accumulate(endAccount.transactions.begin(),
endAccount.transactions.end(),
std::pair<std::uint64_t, std::uint64_t>(0, 0),
[&](auto const& total, auto const& tx)
[&](auto const& total, auto const& txn)
{
// Check for overflow.
auto next = tx.second.feeLevel /
auto next = txn.second.feeLevel /
endAccount.transactions.size();
auto mod = tx.second.feeLevel %
auto mod = txn.second.feeLevel %
endAccount.transactions.size();
if (total.first >= max - next ||
total.second >= max - mod)