mirror of
https://github.com/monero-project/monero.git
synced 2024-12-14 12:26:31 +02:00
simplewallet: print the number of show/all transfers
This commit is contained in:
parent
8d71b2b1b3
commit
5f614ba968
@ -4483,7 +4483,7 @@ bool simple_wallet::show_incoming_transfers(const std::vector<std::string>& args
|
|||||||
tools::wallet2::transfer_container transfers;
|
tools::wallet2::transfer_container transfers;
|
||||||
m_wallet->get_transfers(transfers);
|
m_wallet->get_transfers(transfers);
|
||||||
|
|
||||||
bool transfers_found = false;
|
size_t transfers_found = 0;
|
||||||
for (const auto& td : transfers)
|
for (const auto& td : transfers)
|
||||||
{
|
{
|
||||||
if (!filter || available != td.m_spent)
|
if (!filter || available != td.m_spent)
|
||||||
@ -4496,7 +4496,6 @@ bool simple_wallet::show_incoming_transfers(const std::vector<std::string>& args
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
verbose_string = (boost::format("%68s%68s") % tr("pubkey") % tr("key image")).str();
|
verbose_string = (boost::format("%68s%68s") % tr("pubkey") % tr("key image")).str();
|
||||||
message_writer() << boost::format("%21s%8s%12s%8s%16s%68s%16s%s") % tr("amount") % tr("spent") % tr("unlocked") % tr("ringct") % tr("global index") % tr("tx id") % tr("addr index") % verbose_string;
|
message_writer() << boost::format("%21s%8s%12s%8s%16s%68s%16s%s") % tr("amount") % tr("spent") % tr("unlocked") % tr("ringct") % tr("global index") % tr("tx id") % tr("addr index") % verbose_string;
|
||||||
transfers_found = true;
|
|
||||||
}
|
}
|
||||||
std::string verbose_string;
|
std::string verbose_string;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
@ -4511,6 +4510,7 @@ bool simple_wallet::show_incoming_transfers(const std::vector<std::string>& args
|
|||||||
td.m_txid %
|
td.m_txid %
|
||||||
td.m_subaddr_index.minor %
|
td.m_subaddr_index.minor %
|
||||||
verbose_string;
|
verbose_string;
|
||||||
|
++transfers_found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4529,6 +4529,10 @@ bool simple_wallet::show_incoming_transfers(const std::vector<std::string>& args
|
|||||||
success_msg_writer() << tr("No incoming unavailable transfers");
|
success_msg_writer() << tr("No incoming unavailable transfers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
success_msg_writer() << boost::format("Found %u/%u transfers") % transfers_found % transfers.size();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,6 @@ inline void serialize(Archive &a, unsigned_tx_set &x, const boost::serialization
|
|||||||
#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\003"
|
#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\003"
|
||||||
TEST(Serialization, portability_unsigned_tx)
|
TEST(Serialization, portability_unsigned_tx)
|
||||||
{
|
{
|
||||||
|
|
||||||
const boost::filesystem::path filename = unit_test::data_dir / "unsigned_monero_tx";
|
const boost::filesystem::path filename = unit_test::data_dir / "unsigned_monero_tx";
|
||||||
std::string s;
|
std::string s;
|
||||||
const cryptonote::network_type nettype = cryptonote::TESTNET;
|
const cryptonote::network_type nettype = cryptonote::TESTNET;
|
||||||
|
Loading…
Reference in New Issue
Block a user