Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable the GetLedgerDB action in the ChainDB QSM tests #1339

Open
jorisdral opened this issue Dec 4, 2024 · 0 comments
Open

Re-enable the GetLedgerDB action in the ChainDB QSM tests #1339

jorisdral opened this issue Dec 4, 2024 · 0 comments
Labels

Comments

@jorisdral
Copy link
Contributor

jorisdral commented Dec 4, 2024

Hmm, unfortunately changing the tests to work with the new LedgerDB went under the radar :P

When designing the LedgerDB API, the getLedgerDB function was removed from the ChainDB API, because LedgerDB was no longer a pure datastructure. It was replaced by more concrete functions, amongst which: getCurrentLedger, getImmutableLedger, getPastLedger, getHeaderStateHistory, getReadOnlyForkerAtPoint, getLedgerTablesAtFor, getStatistics.

Options I can think of for how to restore testing:

  • Test (a subset of) the concrete functions by creating a command for each.
  • Don't test the concrete functions, but use TestInternals to output some pure information about the LedgerDB. Maybe we could reconstruct a pure sequence of ledger states from the concrete LedgerDB impls (reading tables from disk too), and compare those against the model?

And no, there is no issue for it, but there probably should be

Originally posted by @jorisdral in #1267 (comment)

The following comment is also relevant: #1267 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant