mirror of
https://github.com/monero-project/monero.git
synced 2025-08-16 20:50:26 -04:00
Merge pull request #7662
4da1112
rpc: send confirmations in get_transactions result (moneromooo-monero)
This commit is contained in:
commit
a1a3e970f7
3 changed files with 19 additions and 5 deletions
|
@ -1044,6 +1044,7 @@ namespace cryptonote
|
|||
if (e.in_pool)
|
||||
{
|
||||
e.block_height = e.block_timestamp = std::numeric_limits<uint64_t>::max();
|
||||
e.confirmations = 0;
|
||||
auto it = per_tx_pool_tx_info.find(tx_hash);
|
||||
if (it != per_tx_pool_tx_info.end())
|
||||
{
|
||||
|
@ -1062,6 +1063,7 @@ namespace cryptonote
|
|||
else
|
||||
{
|
||||
e.block_height = m_core.get_blockchain_storage().get_db().get_tx_block_height(tx_hash);
|
||||
e.confirmations = m_core.get_current_blockchain_height() - e.block_height;
|
||||
e.block_timestamp = m_core.get_blockchain_storage().get_db().get_block_timestamp(e.block_height);
|
||||
e.received_timestamp = 0;
|
||||
e.double_spend_seen = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue