-
Notifications
You must be signed in to change notification settings - Fork 25
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
Break election components apart #610
Conversation
2cd461d
to
f15e419
Compare
84ec998
to
75bf694
Compare
75bf694
to
0f5c8fb
Compare
0f5c8fb
to
ff5fde9
Compare
ff5fde9
to
bec84fb
Compare
bec84fb
to
7d0d915
Compare
7d0d915
to
26d55c7
Compare
26d55c7
to
975a9ab
Compare
975a9ab
to
e662f28
Compare
e662f28
to
a177e97
Compare
a177e97
to
5c4b7e8
Compare
r.checkpoint("small_election"); | ||
r.tester.induct_n(100); | ||
r.checkpoint("inductions"); | ||
r.tester.eden_gm.act<actions::electsettime>(s2t("2021-11-16T18:45:00.000")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like for this to always pull the current datetime so that the election is active after this runs...but haven't figured that out yet. That can be done in a subsequent PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: nice touch!
r.tester.induct_n(100); | ||
r.checkpoint("inductions"); | ||
r.tester.eden_gm.act<actions::electsettime>(s2t("2021-11-16T18:45:00.000")); | ||
r.tester.start_election(true, 10000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: we can centralize the elections scenario in the current run-full-election.wasm
file and use checkpoints to stop the runner where we want. For instance, as opposed of creating this file, just add this start_election
to the bottom of the full-election one with a checkpoint:
r.tester.genesis();
r.tester.run_election(true, 10000, true);
r.checkpoint("small_election");
r.tester.induct_n(100);
r.checkpoint("inductions");
r.tester.eden_gm.act<actions::electsettime>(s2t("2021-11-16T18:45:00.000"));
r.checkpoint("full_election1");
r.tester.start_election(true, 10000);
If someone wants to avoid the start of the new election they can just do cltester run-full-elections.wasm -c full_election1
I also think since we are using checkpoints we should rename the file from run-full-elections
to run-elections
, then it's more generic about elections scenarios....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, cool! That’s awesome!
...omponents/ongoing-election-components/ongoing-round/round-info/meeting-link/meeting-link.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! With the checkpoint suggestion you can remove the new files and cmake changes :)
This componentizes and organizes the election UI. After this PR, we can refactor this to depend on subchain queries. And I'm sure we'll find more opportunities for refactoring as we do that.