mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
json_mempool uses mempoolstatus thread
This commit is contained in:
parent
20a6df212a
commit
6439838103
3 changed files with 5 additions and 15 deletions
|
@ -112,7 +112,7 @@ MempoolStatus::read_mempool()
|
|||
return false;
|
||||
}
|
||||
|
||||
local_copy_of_mempool_txs.emplace_back(_tx_info.receive_time, tx);
|
||||
local_copy_of_mempool_txs.emplace_back(_tx_info, tx);
|
||||
|
||||
} // if (hex_to_pod(_tx_info.id_hash, mem_tx_hash))
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace xmreg
|
|||
struct MempoolStatus
|
||||
{
|
||||
|
||||
using mempool_tx = pair<uint64_t, transaction>;
|
||||
using mempool_tx = pair<tx_info, transaction>;
|
||||
|
||||
static boost::thread m_thread;
|
||||
|
||||
|
|
16
src/page.h
16
src/page.h
|
@ -4502,19 +4502,9 @@ namespace xmreg
|
|||
|
||||
uint64_t height = core_storage->get_current_blockchain_height();
|
||||
|
||||
vector<pair<tx_info, transaction>> mempool_data;
|
||||
|
||||
crypto::hash tx_hash_dummy = null_hash;
|
||||
|
||||
if (!search_mempool(tx_hash_dummy, mempool_data))
|
||||
{
|
||||
j_response["status"] = "error";
|
||||
j_response["message"] = fmt::format("Cant connect to the mempool");
|
||||
|
||||
return j_response;
|
||||
}
|
||||
|
||||
(void) tx_hash_dummy;
|
||||
// get mempool tx from mempoolstatus thread
|
||||
vector<MempoolStatus::mempool_tx> mempool_data
|
||||
= MempoolStatus::get_mempool_txs();
|
||||
|
||||
uint64_t no_mempool_txs = mempool_data.size();
|
||||
|
||||
|
|
Loading…
Reference in a new issue