Skip to content

consensus: refactor the fake validator to take a clock source#7300

Merged
williambanfield merged 6 commits intowb/proposer-based-timestampsfrom
wb/state-add-vote-refactor
Nov 22, 2021
Merged

consensus: refactor the fake validator to take a clock source#7300
williambanfield merged 6 commits intowb/proposer-based-timestampsfrom
wb/state-add-vote-refactor

Conversation

@williambanfield
Copy link
Contributor

Mild refactor of the state tests. This refactor performs two things:

The validatorStub objects now are created with a clock source that they use when signing votes. The goal of this is to be able to control the timestamps that votes are signed with for future testing with proposer based timestamps.

The vote signing helper functions have been altered slightly. They now take a types.BlockID instead of the constituent pieces of a BlockID this seems a bit cleaner and aids readability. They also no longer take a Config object and instead take the one piece of configuration information that they need, the ChainID. This helps the test harness I'm working on by making it not need to keep track of so many disparate pieces of state.

@williambanfield williambanfield changed the title consensus: refactor the test vote helper functions to take a time parameter consensus: refactor the fake validator to take a clock source Nov 19, 2021
Copy link

@creachadair creachadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just little stuff.

williambanfield and others added 5 commits November 22, 2021 15:57
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
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