forked from stellar/stellar-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ledger range calculation (stellar#217)
* Add LedgerRangeReader interface * Add GetLedgerRange implementation for ledgers table * Use GetLedgerRange from the ledgers table for getHealth and getFeeStats * Change varible name * Add GetLedgerRange method for transactions table * Add test for GetLedgerRange for ledgers table * Add GetLedgerRange in ConstantLedgerReader * Add test for GetLedgerRange in transactions table * Fix nil pointer bugs in getTransactions * Remove latest ledger assertion * Comment out the latest ledger assertion * Remove GetLedgerRange from meta table and use ledgerRangeGetter for getHealth and getFeeStats * Remove ledgerCloseTime * Revert newline change * Revert * Remove assertions * revert * Change interface name * insert txns during integration test setup - 1 * insert txns during integration test setup - 2 * insert txns during integration test setup - 3 * Fix linting errors * Fix linting errors - 2 * Fix linting errors - 3 * Fix linting errors - 4 * Fix linting errors - 5 * Revert * Revert-2 * change camel-case naming * change camel-case naming - 2 * Fix linting errrors - 6 * Simplify ledger range query * Simplify ledger range query - 2 * Simplify ledger range query - 3 * Add benchmarking for GetLedgerRange * Fix linter issues - 6 * Remove else condition * Optimise the GetLedgerRange query * Fix intrange linter * Use require.NoError * Move comment to definition * Fix intrange linter - 2 * Fix nomnd linter * Fix intrange linter * Remove db/util.go and add txMeta methods to infrastructure * forgot to gci files again :/ * Remove migration FIXME * Fix linter checks * Add migration for lcm sequence index * Revert transaction_test.go changes * Add newline * Add GetLedgerRange implementation in meta table * Use new GetLedgerRange for getHealth and getFeeStats * Add GetLedgerRange to ConstantLedgerReader * Remove GetLedgerRange from transactions code and use the meta table one * Remove unnecessary file changes * Fix linting errors * Fix linting errors - 2 * Fix linting errors - 3 * Fix linting errors - 4 * Remove unnecessary constants * Use sq.Select instead of sq.Expr * Add nolint * Add nolint - 2 * Handle single row case in ledger range * Remove index migration * Order the ledger results in ASC order * exchange the expected and actual values in assert
- Loading branch information
1 parent
c231749
commit 44515d0
Showing
14 changed files
with
326 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.