diff --git a/src/Rpc/RpcServer.cpp b/src/Rpc/RpcServer.cpp
index 50c63fb738..18d95c7dad 100755
--- a/src/Rpc/RpcServer.cpp
+++ b/src/Rpc/RpcServer.cpp
@@ -1434,10 +1434,44 @@ bool RpcServer::on_get_explorer(const COMMAND_EXPLORER::request& req, COMMAND_EX
if (last_height <= print_blocks_count)
last_height = 0;
- if (req_height == top_block_index) { // show mempool only on home page
- body += "
Transaction pool
";
-
- /// TODO implement mempool list
+ // show mempool only on home page
+ if (req_height == top_block_index) {
+ auto pool = m_core.getMemoryPool();
+ if (!pool.empty()) {
+ body += "Transaction pool
";
+ body += "\n";
+ body += " \n";
+ body += " \n";
+ body += " Date | Hash | Amount | Fee | Size | \n";
+ body += "
\n";
+ body += "\n";
+ body += "\n";
+ for (const CryptoNote::tx_memory_pool::TransactionDetails& txd : pool) {
+ time_t rawtime = (const time_t)txd.receiveTime;
+ struct tm* timeinfo;
+ timeinfo = localtime(&rawtime);
+ std::string txHashStr = Common::podToHex(txd.id);
+
+ body += " \n";
+ body += " ";
+ body += asctime(timeinfo);
+ body.pop_back(); // remove newline after asctime
+ body += " | \n ";
+ body += "";
+ body += txHashStr;
+ body += "";
+ body += " | \n ";
+ body += m_core.currency().formatAmount(getOutputAmount(txd.tx));
+ body += " | \n ";
+ body += m_core.currency().formatAmount(txd.fee);
+ body += " | \n ";
+ body += std::to_string(txd.blobSize);
+ body += " | \n ";
+ body += " |
\n";
+ }
+ body += "\n";
+ body += "
\n";
+ }
}
// list last 10 blocks with txs
@@ -1946,7 +1980,7 @@ bool RpcServer::on_get_transactions_pool_short(const COMMAND_RPC_GET_TRANSACTION
transaction_pool_response mempool_transaction;
mempool_transaction.hash = Common::podToHex(txd.id);
mempool_transaction.fee = txd.fee;
- mempool_transaction.amount_out = getOutputAmount(txd.tx);;
+ mempool_transaction.amount_out = getOutputAmount(txd.tx);
mempool_transaction.size = txd.blobSize;
mempool_transaction.receive_time = txd.receiveTime;
res.transactions.push_back(mempool_transaction);