fix: incorrect details of txs in mempool

pull/39/head
moneroexamples 7 years ago
parent a42801f6cc
commit 2b7fa7acbb

@ -56,7 +56,7 @@ thinwalletCtrls.controller('TransactionDetailsCtrl', function ($scope,
$scope.ring_size = data.mixin_no;
$scope.fee = data.fee;
$scope.tx_size = Math.round(data.size * 1e3) / 1e3;
$scope.no_confirmations = data.no_confirmations;
$scope.no_confirmations = data.no_confirmations === -1 ? "tx in mempool" : data.no_confirmations;
$scope.tx_height = data.tx_height;
$scope.tx_pub_key = data.pub_key;
$scope.timestamp = new Date(data.timestamp * 1000);

@ -863,6 +863,14 @@ CurrentBlockchainStatus::find_txs_in_mempool(
return true;
};
bool
CurrentBlockchainStatus::find_tx_in_mempool(
crypto::hash const& tx_hash,
transaction& tx)
{
}
bool
CurrentBlockchainStatus::get_tx(crypto::hash const& tx_hash, transaction& tx)
{

@ -188,6 +188,10 @@ struct CurrentBlockchainStatus
find_txs_in_mempool(const string& address_str,
json& transactions);
static bool
find_tx_in_mempool(crypto::hash const& tx_hash,
transaction& tx);
static bool
get_tx(crypto::hash const& tx_hash, transaction& tx);

@ -1052,11 +1052,12 @@ YourMoneroRequests::get_tx(const shared_ptr< Session > session, const Bytes & bo
vector<pair<uint64_t, transaction>> mempool_txs =
CurrentBlockchainStatus::get_mempool_txs();
cout << "serach mempool" << endl;
for (auto const& mtx: mempool_txs)
{
cout << (get_transaction_hash(mtx.second)) << '\n';
cout << (get_transaction_hash(mtx.second)) << endl;
if (get_transaction_hash(mtx.second) == tx_hash)
{
tx = mtx.second;
@ -1064,8 +1065,6 @@ YourMoneroRequests::get_tx(const shared_ptr< Session > session, const Bytes & bo
break;
}
}
tx_found = false;
}
else
{

Loading…
Cancel
Save