Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Issue 6904 first free council vote #7632

Closed

Conversation

shamb0
Copy link
Contributor

@shamb0 shamb0 commented Nov 30, 2020

Beta implementation to resolve the issue Participating in Governance should be Free for First Time Voters #6904


First level of demo sequence

@shamb0
Copy link
Contributor Author

shamb0 commented Nov 30, 2020

Hello Shawn,

Like to do quick check on implementation approach for the issue.

In above Demo test sequence, able the detect the first-time voters. But looking for some clarity on balance transaction.
From my initial analysis, looks like fee is not getting detected in all cases ...

@shamb0
Copy link
Contributor Author

shamb0 commented Dec 1, 2020

Hello Shawn,

Thanks for guidance, reverted pallet-democracy changes.
and modified only pallet-collective.

Used below logic to detect the first vote within a proposal.

And verified with testcase "tests::motions_revoting_works()" [slightly modified] ...

From below trace account 2 is detected as first vote in a proposal ...

Note:: Plz ignore changes in "frame/democracy/src/tests.rs", Some mistake in my cleanup ... will correct it :-)

@shamb0
Copy link
Contributor Author

shamb0 commented Dec 2, 2020

Hello Shawn,

Moved the "mod test" to tests.rs

Introduced new test case "motions_all_first_vote_free_works()" to validate the changes ...

looks like I am messing up in testing for Pay::Yes & Pay::No

For Ok condition I am using assert_eq!() pattern

And for Err case I am using match {} pattern, due to enum Err() members are quite high ...

Or is it better to use assert_eq!() here also ? Plz suggest best alternate ...

@shamb0
Copy link
Contributor Author

shamb0 commented Dec 3, 2020

Plz Ignore this PR, instead use PR | 7661

@shamb0 shamb0 closed this Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants