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

Add missing functions from db package. #63

Merged
merged 7 commits into from
Apr 12, 2024
Merged

Conversation

cabrador
Copy link
Contributor

@cabrador cabrador commented Apr 9, 2024

This PR adds missing functionality needed by Aida

  1. BaseDB
    getBackend() - returns the low level level.DB backend
  2. SubstateDB
    NewSubstateTaskPool() is now a struct func of the SubstateDB
    GetLastBlock() - returns last block of given DB
    GetFirstSubstate() - returns the first existing substate inside given DB (first blk and tx)
    GetLastSubstate() - returns the last existing substate inside given DB (last blk and tx)
  3. MakeDefault...DB - we can now create any database type from any database type since every interface implements the BaseDB interface.

db/substate_task.go Outdated Show resolved Hide resolved
Copy link
Contributor

@evgensheff evgensheff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to add unit tests for this functionality in the future, so far everything looks good to me

@cabrador cabrador merged commit 8e88c18 into develop Apr 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants