Merge pull request #4153
37f0799 wallet: distinguish coinbase from other txes in show_transfers (moneromooo-monero)
This commit is contained in:
@@ -1599,6 +1599,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
|
||||
payment.m_block_height = height;
|
||||
payment.m_unlock_time = tx.unlock_time;
|
||||
payment.m_timestamp = ts;
|
||||
payment.m_coinbase = miner_tx;
|
||||
payment.m_subaddr_index = i.first;
|
||||
if (pool) {
|
||||
emplace_or_replace(m_unconfirmed_payments, payment_id, pool_payment_details{payment, double_spend_seen});
|
||||
@@ -7556,6 +7557,7 @@ void wallet2::light_wallet_get_address_txs()
|
||||
payment.m_block_height = t.height;
|
||||
payment.m_unlock_time = t.unlock_time;
|
||||
payment.m_timestamp = t.timestamp;
|
||||
payment.m_coinbase = t.coinbase;
|
||||
|
||||
if (t.mempool) {
|
||||
if (std::find(unconfirmed_payments_txs.begin(), unconfirmed_payments_txs.end(), tx_hash) == unconfirmed_payments_txs.end()) {
|
||||
|
||||
+10
-2
@@ -260,12 +260,12 @@ namespace tools
|
||||
uint64_t m_block_height;
|
||||
uint64_t m_unlock_time;
|
||||
uint64_t m_timestamp;
|
||||
bool m_coinbase;
|
||||
cryptonote::subaddress_index m_subaddr_index;
|
||||
};
|
||||
|
||||
struct address_tx : payment_details
|
||||
{
|
||||
bool m_coinbase;
|
||||
bool m_mempool;
|
||||
bool m_incoming;
|
||||
};
|
||||
@@ -1324,7 +1324,7 @@ BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 9)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::multisig_info, 1)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::multisig_info::LR, 0)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::multisig_tx_set, 1)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::payment_details, 3)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::payment_details, 4)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::pool_payment_details, 1)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::unconfirmed_transfer_details, 8)
|
||||
BOOST_CLASS_VERSION(tools::wallet2::confirmed_transfer_details, 6)
|
||||
@@ -1591,16 +1591,24 @@ namespace boost
|
||||
a & x.m_timestamp;
|
||||
if (ver < 2)
|
||||
{
|
||||
x.m_coinbase = false;
|
||||
x.m_subaddr_index = {};
|
||||
return;
|
||||
}
|
||||
a & x.m_subaddr_index;
|
||||
if (ver < 3)
|
||||
{
|
||||
x.m_coinbase = false;
|
||||
x.m_fee = 0;
|
||||
return;
|
||||
}
|
||||
a & x.m_fee;
|
||||
if (ver < 4)
|
||||
{
|
||||
x.m_coinbase = false;
|
||||
return;
|
||||
}
|
||||
a & x.m_coinbase;
|
||||
}
|
||||
|
||||
template <class Archive>
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace tools
|
||||
entry.unlock_time = pd.m_unlock_time;
|
||||
entry.fee = pd.m_fee;
|
||||
entry.note = m_wallet->get_tx_note(pd.m_tx_hash);
|
||||
entry.type = "in";
|
||||
entry.type = pd.m_coinbase ? "block" : "in";
|
||||
entry.subaddr_index = pd.m_subaddr_index;
|
||||
entry.address = m_wallet->get_subaddress_as_str(pd.m_subaddr_index);
|
||||
set_confirmations(entry, m_wallet->get_blockchain_current_height(), m_wallet->get_last_block_reward());
|
||||
|
||||
Reference in New Issue
Block a user