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

Fix tests by checking block state invariants in the same state context #1136

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

abizjak
Copy link
Member

@abizjak abizjak commented Mar 26, 2024

Purpose

Fix tests.

Checking state invariants, it is crucial that the invariant checking function is executed in the same context as the state is constructed, since, for example, LMDB database must be available for looking up accounts.

Other uses of assertBlockStateInvariants are correct already.

It's unclear why this test ever worked but possibly it sometimes worked due to unsafePerformIO usage. It did not work on my machine though, it caused an LMDB error.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@abizjak abizjak requested review from limemloh and td202 March 26, 2024 20:36
@abizjak abizjak changed the title Fix tests by checking block state invariants in the same state. Fix tests by checking block state invariants in the same state context Mar 27, 2024
@abizjak abizjak merged commit c3cecb7 into main Mar 27, 2024
3 checks passed
@abizjak abizjak deleted the fix-tests branch March 27, 2024 11:45
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.

None yet

2 participants