aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/blockchain_ancestry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_utilities/blockchain_ancestry.cpp')
-rw-r--r--src/blockchain_utilities/blockchain_ancestry.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/blockchain_utilities/blockchain_ancestry.cpp b/src/blockchain_utilities/blockchain_ancestry.cpp
index 89b932e4f..99a84606d 100644
--- a/src/blockchain_utilities/blockchain_ancestry.cpp
+++ b/src/blockchain_utilities/blockchain_ancestry.cpp
@@ -32,6 +32,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/archive/portable_binary_iarchive.hpp>
#include <boost/archive/portable_binary_oarchive.hpp>
+#include <boost/filesystem/path.hpp>
#include "common/unordered_containers_boost_serialization.h"
#include "common/command_line.h"
#include "common/varint.h"
@@ -149,7 +150,7 @@ struct ancestry_state_t
{
std::unordered_map<crypto::hash, cryptonote::transaction> old_tx_cache;
a & old_tx_cache;
- for (const auto i: old_tx_cache)
+ for (const auto& i: old_tx_cache)
tx_cache.insert(std::make_pair(i.first, ::tx_data_t(i.second)));
}
else
@@ -161,7 +162,7 @@ struct ancestry_state_t
std::unordered_map<uint64_t, cryptonote::block> old_block_cache;
a & old_block_cache;
block_cache.resize(old_block_cache.size());
- for (const auto i: old_block_cache)
+ for (const auto& i: old_block_cache)
block_cache[i.first] = i.second;
}
else
@@ -575,7 +576,6 @@ int main(int argc, char* argv[])
{
add_ancestry(state.ancestry, txid, ancestor{amount, offset});
// find the tx which created this output
- bool found = false;
crypto::hash output_txid;
if (!get_output_txid(state, db, amount, offset, output_txid))
{
@@ -693,7 +693,6 @@ int main(int argc, char* argv[])
add_ancestor(ancestry, amount, offset);
// find the tx which created this output
- bool found = false;
crypto::hash output_txid;
if (!get_output_txid(state, db, amount, offset, output_txid))
{