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

Convert coordinator/substrate/db to use create_db macro #435

Closed
wants to merge 1 commit into from

Conversation

davidjohnbell
Copy link
Contributor

Description

This is a continuation of pr #408. SubstrateDb was split into BlockDb, EventDb, SessionDb, and BatchDb, some helper methods to convert to/from the expected type were removed as they're covered by the macro.

Considerations

  • Helper function handled was renamed to is_unhandled. Calling code was largely in the form if !SubstrateDb::handled(...) { ... }, removing the negation and changing the name helps align the code with the intent.
  • handle_event could be refactored into a simple set method, I noticed that the calling code often performs the necessary checks however I didn't feel comfortable making this change due to some async statements that could break the previous assertions.

@davidjohnbell
Copy link
Contributor Author

davidjohnbell commented Nov 16, 2023

I'm resolving the merge conflicts 😓. For some reason git assured me I was up to date on my branch...

@davidjohnbell
Copy link
Contributor Author

closing in favor of pr #436

@davidjohnbell davidjohnbell deleted the create-db-substrate branch November 16, 2023 11:29
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.

1 participant