This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
combine vote and execute, modify the test files based on the change #389
Merged
Conversation
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
lastperson
suggested changes
Sep 15, 2021
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.
Additional tests that would help:
- Check that vote on a Passed proposal (with failed execution) does not modify anything in the proposal. Votes, status, etc. should stay unchanged.
- Check that vote on a Passed proposal triggers execution and it is successful.
- Check that vote on a Passed proposal triggers execution and it is reverted.
- Check that different kinds of fails in execution are caught.
P1sar
reviewed
Sep 17, 2021
lastperson
suggested changes
Sep 17, 2021
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.
Check that vote on a Passed proposal triggers execution and it is successful.
This case is not covered it seems.
- Vote 1
- Vote 2 -> Passed -> Execution reverted
- Vote 3 -> Execution succeeds.
lastperson
approved these changes
Sep 17, 2021
P1sar
added a commit
that referenced
this pull request
Oct 27, 2021
* Anderson/remove deposit record (#382) * remove DepositRecord in every handler, modify event in Bridge, modify IDepositExecute interface * modify test files based on removing deposit records * add handlerResponse to deposit event and modify test files based on the event * Rename chainID to domainID (#384) * Add admin set deposit nonce (#385) * Сombine vote and execute [Breaking] (#389) * Remove resources from handler constructors (#393) * Update dependencies and bump version (#394) Set disableConfirmationListener: true to avoid spamming ganache during tests. trufflesuite/truffle#3522 * Remove fund functions (#412) Co-authored-by: andersonlee725 <86676141+andersonlee725@users.noreply.github.com> Co-authored-by: Oleksii Matiiasevych <oleksii@chainsafe.io>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Combine vote and execute.
During voting, if the proposal status is changed to Passed, then automatically executes the proposal.
In this case, even though the execute is reverted, the whole transaction is not reverted.
If the execute is reverted, the proposal status still stays on Passed.
And if the proposal status was in Passed, then automatically executes the Proposal without any _expiry checking.
But in this case, if the execute is reverted, the whole transaction is reverted.
For above functionality, executeProposal function accepts a new parameter(bool revertOnFail).
Related Issue Or Context
Closes: #255
How Has This Been Tested? Testing details.
First, added a test contract that reverts in its executeProposal function.
Checked
Types of changes
Checklist: