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

test: fix failed unit tests #209

Merged
merged 8 commits into from
Feb 21, 2023
Merged

Conversation

minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Feb 16, 2023

No description provided.

@minh-bq minh-bq requested a review from DNK90 February 16, 2023 10:22
The RemoveOutdatedRecents expects snapshot number which is block number - 1
This test is outdated since the implementation changes. Update the unit test to
correctly test the current implementation.
We change toBlockNumArg implementation to transform the block number the same
way as RPC: -1 -> latest, -2 -> pending. Update the unit test to reflect the
current implementation.
In real system, the bloom of each receipt is calculated before
FinalizeAndAssemble block. As a result, we change CreateBloom to MergeBloom when
creating block in NewBlock for optimization. However, the GenerateChain function
which is used mostly for testing does not follow that assumption. This commit
calculates the bloom of each receipt before FinalizeAndAssemble block.
@minh-bq minh-bq merged commit 5d3c913 into axieinfinity:master Feb 21, 2023
@minh-bq minh-bq deleted the fix/unit-test branch February 21, 2023 08:32
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