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

Race condition in unit tests: blocks in initialization_blocks not cloned for each node #4550

Open
dsiganos opened this issue Apr 11, 2024 · 0 comments
Labels
unit test Related to a new, changed or fixed unit test

Comments

@dsiganos
Copy link
Contributor

dsiganos commented Apr 11, 2024

The way we apply nano::test::system::initialization_blocks to multiple nodes is technically wrong, although the problem is not easy to hit since the blocks are given to each node in sequence. But to be absolutely safe, we should clone each block before giving it to a node to ensure that 2 nodes do not work on the same block sideband at the same time.

To do this, we need a polymorphic way to clone blocks given a pointer to nano::block.

This affects unit tests only.

@dsiganos dsiganos added the unit test Related to a new, changed or fixed unit test label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit test Related to a new, changed or fixed unit test
Projects
None yet
Development

No branches or pull requests

1 participant