wallet: fix output collision detection for view wallets

View wallets do not have the spend secret key, and are thus
unable to derive key images for incoming outputs. Moreover,
a previous patch set key images to zero as a means to mark
an output as having an unknown key image, so they could be
filled in when importing key images at a later time. That
later patch caused spurious collisions. We now use public
keys to detect duplicate outputs. Public keys obtained from
the blockchain are checked to be identical to the ones
derived locally, so can't be spoofed.
This commit is contained in:
moneromooo-monero 2016-11-07 18:50:05 +00:00
parent 1372f255af
commit c80f4d416d
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
3 changed files with 47 additions and 21 deletions

View file

@ -236,6 +236,6 @@ namespace crypto {
}
}
CRYPTO_MAKE_COMPARABLE(public_key)
CRYPTO_MAKE_HASHABLE(public_key)
CRYPTO_MAKE_HASHABLE(key_image)
CRYPTO_MAKE_COMPARABLE(signature)