aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-04 13:30:40 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-16 10:32:54 +0000
commit504428ab4a7aa7773832acdc3de0baad22d6b9b7 (patch)
treee0c46debfa497a3110e5fce39c0729f2c5f4aaf2 /src/blockchain_utilities
parentwallet: add a set_ring command (diff)
downloadmonero-504428ab4a7aa7773832acdc3de0baad22d6b9b7.tar.xz
ringdb: use the genesis block as a db name
This will avoid careless forkers polluting the shared database even if they make their own chain. They'll then automatically start using another subdb, and any key-reusing fork of those forks will reuse their subdbs.
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_blackball.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp
index d065d61cb..40ce898d9 100644
--- a/src/blockchain_utilities/blockchain_blackball.cpp
+++ b/src/blockchain_utilities/blockchain_blackball.cpp
@@ -310,7 +310,9 @@ int main(int argc, char* argv[])
std::unordered_map<crypto::key_image, std::vector<uint64_t>> relative_rings;
std::unordered_map<output_data, std::unordered_set<crypto::key_image>> outputs;
std::unordered_set<output_data> spent, newly_spent;
- tools::ringdb ringdb(output_file_path.string());
+
+ cryptonote::block b = core_storage[0]->get_db().get_block_from_height(0);
+ tools::ringdb ringdb(output_file_path.string(), epee::string_tools::pod_to_hex(get_block_hash(b)));
for (size_t n = 0; n < inputs.size(); ++n)
{