diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-06 20:48:17 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-06 21:55:05 +0000 |
commit | a98e976f9eabf2112a75347147becc1956ef8d66 (patch) | |
tree | c7ee89c4b09ee601a829cd60d76b4c81cc41a694 /src/blockchain_db/blockchain_db.h | |
parent | Merge pull request #518 (diff) | |
download | monero-a98e976f9eabf2112a75347147becc1956ef8d66.tar.xz |
blockchain_db: fixup missing key images in early DB version
Early DB versions did not store key images for inputs if the
transaction spending them had no outputs (ie, all fee). This
is not correct, as this would allow these outputs to be double
spent. This was fixed in 533acc30eda7792c802ea8b6417917fa99b8bc2b
a few months ago, but databases having synced blocks 2021612 and
685498 with a faulty version will be missing those key images
in the spent keys database. This code checks for this, and adds
those key images if they are missing.
Diffstat (limited to '')
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 152f29b38..193a34386 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -503,6 +503,9 @@ public: virtual void set_hard_fork_version(uint64_t height, uint8_t version) = 0; virtual uint8_t get_hard_fork_version(uint64_t height) const = 0; + // fix up anything that may be wrong due to past bugs + virtual void fixup(); + void set_auto_remove_logs(bool auto_remove) { m_auto_remove_logs = auto_remove; } bool m_open; |