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 multiple chain resets #2897

Merged
merged 11 commits into from
Oct 22, 2021
Merged

Test multiple chain resets #2897

merged 11 commits into from
Oct 22, 2021

Conversation

upbqdn
Copy link
Member

@upbqdn upbqdn commented Oct 18, 2021

Motivation

This PR tests whether Zebra clears its mempool on multiple chain resets.

Solution

The proptest generates ten chain tips that represent either a chain reset or growth. The test then uses these chain tips and checks if the mempool is cleared when there is a reset and not cleared when there is a growth.

Finishes and closes #2374.

@upbqdn upbqdn requested review from jvff and teor2345 October 18, 2021 12:13
@upbqdn upbqdn self-assigned this Oct 18, 2021
The mempool evicts expired transactions. When working with mocked data,
appending a new block typically clears the mempool because transactions become
expired. For this reason, the expiry height of each transactions is adjusted so
that it is greater than the new chain tip's height.
@upbqdn upbqdn force-pushed the test-multiple-chain-resets branch from 6a02bfa to 751846a Compare October 18, 2021 12:17
@teor2345 teor2345 added the P-Low label Oct 19, 2021
@teor2345 teor2345 enabled auto-merge (squash) October 22, 2021 02:19
@teor2345 teor2345 merged commit 4f7a977 into main Oct 22, 2021
@teor2345 teor2345 deleted the test-multiple-chain-resets branch October 22, 2021 02:54
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.

ZIP-200: Test that mempool storage is cleared when a network upgrade activates
4 participants