mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
db_lmdb: remove redundant checks
This commit is contained in:
parent
1362846dd7
commit
57b80c541e
1 changed files with 4 additions and 10 deletions
|
@ -1162,12 +1162,9 @@ tx_out BlockchainLMDB::get_output(const crypto::hash& h, const uint64_t& index)
|
||||||
|
|
||||||
mdb_cursor_get(cur, &k, &v, MDB_FIRST_DUP);
|
mdb_cursor_get(cur, &k, &v, MDB_FIRST_DUP);
|
||||||
|
|
||||||
if (index != 0)
|
for (uint64_t i = 0; i < index; ++i)
|
||||||
{
|
{
|
||||||
for (uint64_t i = 0; i < index; ++i)
|
mdb_cursor_get(cur, &k, &v, MDB_NEXT_DUP);
|
||||||
{
|
|
||||||
mdb_cursor_get(cur, &k, &v, MDB_NEXT_DUP);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mdb_cursor_get(cur, &k, &v, MDB_GET_CURRENT);
|
mdb_cursor_get(cur, &k, &v, MDB_GET_CURRENT);
|
||||||
|
@ -1264,12 +1261,9 @@ tx_out_index BlockchainLMDB::get_output_tx_and_index(const uint64_t& amount, con
|
||||||
|
|
||||||
mdb_cursor_get(cur, &k, &v, MDB_FIRST_DUP);
|
mdb_cursor_get(cur, &k, &v, MDB_FIRST_DUP);
|
||||||
|
|
||||||
if (index != 0)
|
for (uint64_t i = 0; i < index; ++i)
|
||||||
{
|
{
|
||||||
for (uint64_t i = 0; i < index; ++i)
|
mdb_cursor_get(cur, &k, &v, MDB_NEXT_DUP);
|
||||||
{
|
|
||||||
mdb_cursor_get(cur, &k, &v, MDB_NEXT_DUP);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mdb_cursor_get(cur, &k, &v, MDB_GET_CURRENT);
|
mdb_cursor_get(cur, &k, &v, MDB_GET_CURRENT);
|
||||||
|
|
Loading…
Reference in a new issue