diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-06-10 11:34:20 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-06-10 11:34:20 -0500 |
commit | a1a3e970f7beddf7f7ea0d09552e049dca4a807d (patch) | |
tree | 6eb250e7e5ace6c91c186a5870763e6c8dd96b42 /src/rpc/core_rpc_server.cpp | |
parent | Merge pull request #7481 (diff) | |
parent | rpc: send confirmations in get_transactions result (diff) | |
download | monero-a1a3e970f7beddf7f7ea0d09552e049dca4a807d.tar.xz |
Merge pull request #7662
4da1112 rpc: send confirmations in get_transactions result (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index ded545efa..8d8a68efb 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -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; |