allow different shifts for books and keys. default to 10 and 20 respectively

This commit is contained in:
CJ Cobb
2021-05-06 20:13:04 +00:00
parent 20b8059151
commit 144ad5eb19
5 changed files with 293 additions and 69 deletions

View File

@@ -329,7 +329,7 @@ PostgresBackend::fetchLedgerPage(
std::uint32_t ledgerSequence,
std::uint32_t limit) const
{
auto index = getIndexOfSeq(ledgerSequence);
auto index = getKeyIndexOfSeq(ledgerSequence);
if (!index)
return {};
PgQuery pgQuery(pgPool_);
@@ -366,6 +366,8 @@ PostgresBackend::fetchLedgerPage(
return {results, returnCursor, "Data may be incomplete"};
return {results, returnCursor};
}
if (!cursor)
return {{}, {}, "Data may be incomplete"};
return {};
}