From c6a70af86a4a9e6eeca340f80634c1c09b26a0eb Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 5 Mar 2019 22:31:29 +0000 Subject: wallet2: key image import fixes - return the right output data when offset is not zero - do not consider import failed if result height is zero (it can be 0 if unknown) - select the right tx pubkey when using subaddresses (it's faster, and we might select the wrong one if we got an output using one of the additional tx keys) - account for skipped outputs for spent/unspent balance info "spent" is arguably wrong, since it will count spent change multiple times as it goes through receive/spend cycles. --- src/simplewallet/simplewallet.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/simplewallet/simplewallet.cpp') diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 8c0b300ad..520d6a9d9 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -8597,13 +8597,8 @@ bool simple_wallet::import_key_images(const std::vector &args) { uint64_t spent = 0, unspent = 0; uint64_t height = m_wallet->import_key_images(filename, spent, unspent); - if (height > 0) - { - success_msg_writer() << "Signed key images imported to height " << height << ", " - << print_money(spent) << " spent, " << print_money(unspent) << " unspent"; - } else { - fail_msg_writer() << "Failed to import key images"; - } + success_msg_writer() << "Signed key images imported to height " << height << ", " + << print_money(spent) << " spent, " << print_money(unspent) << " unspent"; } catch (const std::exception &e) { -- cgit v1.2.3