diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-11-18 10:32:56 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-11-18 10:36:12 +0200 |
commit | a44428e228e6181d928a98915ced0e55aaeafaa9 (patch) | |
tree | 9405b054c839333034ac5df176f85b0bdb371343 | |
parent | Merge pull request #481 (diff) | |
parent | Revert "db_bdb: record numbers for recno databases start at 1" (diff) | |
download | monero-a44428e228e6181d928a98915ced0e55aaeafaa9.tar.xz |
Merge pull request #485
1b40952 Revert "db_bdb: record numbers for recno databases start at 1" (moneromooo-monero)
-rw-r--r-- | src/blockchain_db/berkeleydb/db_bdb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/blockchain_db/berkeleydb/db_bdb.cpp b/src/blockchain_db/berkeleydb/db_bdb.cpp index a980703ec..da68ff40c 100644 --- a/src/blockchain_db/berkeleydb/db_bdb.cpp +++ b/src/blockchain_db/berkeleydb/db_bdb.cpp @@ -1516,7 +1516,7 @@ output_data_t BlockchainBDB::get_output_key(const uint64_t& global_index) const LOG_PRINT_L3("BlockchainBDB::" << __func__); check_open(); - Dbt_copy<uint32_t> k(global_index + 1); + Dbt_copy<uint32_t> k(global_index); Dbt_copy<output_data_t> v; auto get_result = m_output_keys->get(DB_DEFAULT_TX, &k, &v, 0); if (get_result == DB_NOTFOUND) @@ -1652,7 +1652,7 @@ tx_out_index BlockchainBDB::get_output_tx_and_index_from_global(const uint64_t& LOG_PRINT_L3("BlockchainBDB::" << __func__); check_open(); - Dbt_copy<uint32_t> k(index + 1); + Dbt_copy<uint32_t> k(index); Dbt_copy<crypto::hash > v; auto get_result = m_output_txs->get(DB_DEFAULT_TX, &k, &v, 0); @@ -2011,7 +2011,7 @@ void BlockchainBDB::get_output_key(const uint64_t &amount, const std::vector<uin { for (const uint64_t &index : global_indices) { - Dbt_copy<uint32_t> k(index + 1); + Dbt_copy<uint32_t> k(index); Dbt_copy<output_data_t> v; auto get_result = m_output_keys->get(DB_DEFAULT_TX, &k, &v, 0); |