-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test if the mempool storage is cleared (#2815)
* Move mempool tests into `tests::vector` sub-module Make it consistent with other test modules and prepare for adding property tests. * Reorder imports Make it consistent with the general guidelines followed on other modules. * Export `ChainTipBlock` and `ChainTipSender` Allow these types to be used in other crates for testing purposes. * Derive `Arbitrary` for `ChainTipBlock` Make it easy to generate random `ChainTipBlock`s for usage in property tests. * Refactor to move test methods into `tests` module Reduce the repeated test configuration attributes and make it easier to see what is test specific and what is part of the general implementation. * Add a `Mempool::dummy_call` test helper method Performs a dummy call just so that `poll_ready` gets called. * Use `dummy_call` in existing tests Replace the custom dummy requests with the helper method. * Test if the mempool is cleared on chain reset A chain reset should force the mempool storage to be cleared so that transaction verification can restart using the new chain tip. * Test if mempool is cleared on syncer restart If the block synchronizer falls behind and then starts catching up again, the mempool should be disabled and therefore the storage should be cleared.
- Loading branch information
Showing
8 changed files
with
779 additions
and
619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.