-
Notifications
You must be signed in to change notification settings - Fork 48
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
fix: fail poll on empty list of execute_msgs #16
Conversation
ezaanm
commented
Sep 14, 2021
- fail poll if the execute_msgs list is empty
- solves Executed messages may be empty, but without error #13
- thanks @pronvis for pointing this out
As @MSNTCS pointed out in the comment above we should not implement this change. The reason is because Poll's should be allowed to exist with empty execute_msgs such as a text only based poll. This change would have marked those Poll's as This will close #13 as well. |
@MSNTCS Hi! You wrote:
Okey, but in code you still have: if let Some(all_msgs) = a_poll.execute_data {
// some code here
} else {
return Err(ContractError::NoExecuteData {});
} So, you still have this error. And, because of quote that I mention about, you have some "hidden logic" like:
Issue that I created (#13) fills this "gap" in logic. Yep, maybe it fills it in a wrong way, but even if so - you need to have same logic for:
|
I think you need to change field |
@pronvis thanks. I agree with you on some points, I do not see having problems with |
Also, I found the same logic in Mirror Gov contract: https://github.com/Mirror-Protocol/mirror-contracts/blob/3c182c6d32e4083b13838cc5aba570e4ae279879/contracts/mirror_gov/src/contract.rs#L502 Carlos (Mirror team member) respond with:
|
@pronvis of course they do not need to be executed. The point is, with the current design, if somebody executes it, the poll status would not stay in passed, it would be an expired/failed poll and it changes the history of a poll. This issue is a minor issue, but still, I think it is better to keep the states as |
@MSNTCS but why, if |
@pronvis with the current design, if you send an execute message for a text proposal even if it is passed, the current design change the status to
|
@MSNTCS on |
@MSNTCS this is how I solve it: Nexus-Protocol/services-contracts#14 |