mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-29 21:41:07 +02:00
Drop unused setRange arg to BerkeleyBatch::ReadAtCursor
This commit is contained in:
@@ -315,20 +315,14 @@ public:
|
|||||||
return pcursor;
|
return pcursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, bool setRange = false)
|
int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue)
|
||||||
{
|
{
|
||||||
// Read at cursor
|
// Read at cursor
|
||||||
Dbt datKey;
|
Dbt datKey;
|
||||||
unsigned int fFlags = DB_NEXT;
|
|
||||||
if (setRange) {
|
|
||||||
datKey.set_data(ssKey.data());
|
|
||||||
datKey.set_size(ssKey.size());
|
|
||||||
fFlags = DB_SET_RANGE;
|
|
||||||
}
|
|
||||||
Dbt datValue;
|
Dbt datValue;
|
||||||
datKey.set_flags(DB_DBT_MALLOC);
|
datKey.set_flags(DB_DBT_MALLOC);
|
||||||
datValue.set_flags(DB_DBT_MALLOC);
|
datValue.set_flags(DB_DBT_MALLOC);
|
||||||
int ret = pcursor->get(&datKey, &datValue, fFlags);
|
int ret = pcursor->get(&datKey, &datValue, DB_NEXT);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
else if (datKey.get_data() == nullptr || datValue.get_data() == nullptr)
|
else if (datKey.get_data() == nullptr || datValue.get_data() == nullptr)
|
||||||
|
Reference in New Issue
Block a user