-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Introduce time port in PoA service (#2145)
## Linked Issues/PRs Closes #2091 ## Description This PR introduces a `GetTime` port in the PoA service. The port is implemented in a `SystemTime` adapter matching the current behavior of the PoA service when running live, and in a `TestTime` implementation allowing fine-grained control of how time elapses in tests. Three additional tests have been added for previously untestable (but correct) behavior: - `service_test::trigger_tests::interval_trigger_produces_blocks_in_the_future_when_time_is_lagging` - `service_test::trigger_tests::interval_trigger_produces_blocks_with_current_time_when_block_production_is_lagging` - `service_test::trigger_tests::interval_trigger_produces_blocks_in_the_future_when_time_rewinds` ## Checklist - [x] Old behavior is reflected in tests ### Before requesting review - [x] I have reviewed the code myself
- Loading branch information
Showing
9 changed files
with
352 additions
and
26 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.