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

[Debugging] fix test: "testGetLatestBlockExtensively" #20

Open
bbulgu opened this issue Jun 12, 2021 · 0 comments
Open

[Debugging] fix test: "testGetLatestBlockExtensively" #20

bbulgu opened this issue Jun 12, 2021 · 0 comments

Comments

@bbulgu
Copy link
Contributor

bbulgu commented Jun 12, 2021

org.opentest4j.AssertionFailedError: latest block wrong ==> Expected :000011111011011110110111111100838048897 Actual :000000000000000000000000000000838048897

The ending is the same but the starting part is different.

The first iteration runs fine, however, in the second iteration we get the error.

The error doesn't arise if we change the bottom if clause to if (i % 2 == 1) {

I think this might be because the insertBlock method works only if the prevAddress is different from the node's address and if the if clause remains as i%2==0, then the insertBlock doesn't work since prevAddress is equal to address in that case.

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

No branches or pull requests

1 participant