diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 156c6f47..c68717e6 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2110,14 +2110,6 @@ uint64_t wallet2::balance(uint64_t& unlocked, uint64_t& awaiting_in, uint64_t& a awaiting_out = 0; mined = 0; -// struct pos_coinbase_tx_t -// { -// pos_coinbase_tx_t() : tx(nullptr), unspent_sum(0) {} -// const currency::transaction* tx; -// uint64_t unspent_sum; -// }; -// std::unordered_map pos_coinbase_txs; - for(auto& td : m_transfers) { if (td.is_spendable() || td.is_reserved_for_escrow()) @@ -2127,28 +2119,9 @@ uint64_t wallet2::balance(uint64_t& unlocked, uint64_t& awaiting_in, uint64_t& a unlocked += td.amount(); if (td.m_flags & WALLET_TRANSFER_DETAIL_FLAG_MINED_TRANSFER) mined += td.amount(); -// bool pos_coinbase = false; -// if (is_coinbase(td.m_ptx_wallet_info->m_tx, pos_coinbase)) -// mined += td.amount(); -// if (pos_coinbase) -// { -// auto& el = pos_coinbase_txs[get_transaction_hash(td.m_ptx_wallet_info->m_tx)]; -// el.tx = &td.m_ptx_wallet_info->m_tx; -// el.unspent_sum += td.amount(); -// } } } -// for(auto pt : pos_coinbase_txs) -// { -// uint64_t mined_prev = mined; -// THROW_IF_FALSE_WALLET_INT_ERR_EX(pt.second.tx->vin.size() == 2, "Invalid coinbase tx in the container"); -// uint64_t coinbase_stake_amount = boost::get(pt.second.tx->vin[1]).amount; -// if (coinbase_stake_amount <= pt.second.unspent_sum) -// mined -= coinbase_stake_amount; -// THROW_IF_FALSE_WALLET_INT_ERR_EX(mined <= mined_prev, ""); -// } - for(auto& utx : m_unconfirmed_txs) { if (utx.second.is_income) @@ -2165,11 +2138,6 @@ uint64_t wallet2::balance(uint64_t& unlocked, uint64_t& awaiting_in, uint64_t& a awaiting_out += utx.second.amount; } } - //collect escrow proposals change -// for (auto& exp: m_money_expirations) -// { -// balance_total += exp.change_amount; -// } return balance_total; }