aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/blockchain_blackball.cpp
diff options
context:
space:
mode:
authorKevin Barbour <kevinbarbourd@gmail.com>2021-01-23 10:38:50 +0100
committerKevin Barbour <kevinbarbourd@gmail.com>2021-02-09 08:05:05 +0100
commit85db1734e7dd456c1edb095a2c829527262b96c7 (patch)
tree988b4b80b55192462b33c1acc7210746c1e1f0a0 /src/blockchain_utilities/blockchain_blackball.cpp
parentMerge pull request #7260 (diff)
downloadmonero-85db1734e7dd456c1edb095a2c829527262b96c7.tar.xz
Remove unused variables in monero codebase
There are quite a few variables in the code that are no longer (or perhaps never were) in use. These were discovered by enabling compiler warnings for unused variables and cleaning them up. In most cases where the unused variables were the result of a function call the call was left but the variable assignment removed, unless it was obvious that it was a simple getter with no side effects.
Diffstat (limited to 'src/blockchain_utilities/blockchain_blackball.cpp')
-rw-r--r--src/blockchain_utilities/blockchain_blackball.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp
index a8197483f..e439895bf 100644
--- a/src/blockchain_utilities/blockchain_blackball.cpp
+++ b/src/blockchain_utilities/blockchain_blackball.cpp
@@ -47,9 +47,6 @@ namespace po = boost::program_options;
using namespace epee;
using namespace cryptonote;
-static const char zerokey[8] = {0};
-static const MDB_val zerokval = { sizeof(zerokey), (void *)zerokey };
-
static uint64_t records_per_sync = 200;
static uint64_t db_flags = 0;
static MDB_dbi dbi_relative_rings;
@@ -703,7 +700,6 @@ static void get_per_amount_outputs(MDB_txn *txn, uint64_t amount, uint64_t &tota
int dbr = mdb_cursor_open(txn, dbi_per_amount, &cur);
CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to open cursor for per amount outputs: " + std::string(mdb_strerror(dbr)));
MDB_val k, v;
- mdb_size_t count = 0;
k.mv_size = sizeof(uint64_t);
k.mv_data = (void*)&amount;
dbr = mdb_cursor_get(cur, &k, &v, MDB_SET);
@@ -726,7 +722,6 @@ static void inc_per_amount_outputs(MDB_txn *txn, uint64_t amount, uint64_t total
int dbr = mdb_cursor_open(txn, dbi_per_amount, &cur);
CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to open cursor for per amount outputs: " + std::string(mdb_strerror(dbr)));
MDB_val k, v;
- mdb_size_t count = 0;
k.mv_size = sizeof(uint64_t);
k.mv_data = (void*)&amount;
dbr = mdb_cursor_get(cur, &k, &v, MDB_SET);
@@ -1077,7 +1072,6 @@ static std::vector<std::pair<uint64_t, uint64_t>> load_outputs(const std::string
s[len - 1] = 0;
if (!s[0])
continue;
- std::pair<uint64_t, uint64_t> output;
uint64_t offset, num_offsets;
if (sscanf(s, "@%" PRIu64, &amount) == 1)
{
@@ -1269,8 +1263,6 @@ int main(int argc, char* argv[])
LOG_PRINT_L0("Scanning for spent outputs...");
- size_t done = 0;
-
const uint64_t start_blackballed_outputs = get_num_spent_outputs();
tools::ringdb ringdb(output_file_path.string(), epee::string_tools::pod_to_hex(get_genesis_block_hash(inputs[0])));