mirror of
https://github.com/monero-project/monero.git
synced 2025-08-16 09:10:13 -04:00
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.
This commit is contained in:
parent
e65221d690
commit
c6a70af86a
2 changed files with 19 additions and 22 deletions
|
@ -8597,13 +8597,8 @@ bool simple_wallet::import_key_images(const std::vector<std::string> &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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue