Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Conversation

ochaloup
Copy link

@ochaloup ochaloup commented Mar 1, 2023

The contract of SPL Gov works with cool off time to assert if it's time to finalize vote.
https://github.com/solana-labs/solana-program-library/blob/master/governance/program/src/state/proposal.rs#L340 While there is the greater than not with 'equal' in comparision.

The contract of SPL Gov works with cool off time to assert if it's time
to finalize vote.
https://github.com/solana-labs/solana-program-library/blob/master/governance/program/src/state/proposal.rs#L340
While there is the greater than not with 'equal' in comparision.
@vercel
Copy link

vercel bot commented Mar 1, 2023

@ochaloup is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@@ -946,12 +946,13 @@ export class Proposal {
return this.isPreVotingState()
? governance.config.maxVotingTime
: (this.votingAt?.toNumber() ?? 0) +
governance.config.maxVotingTime -
governance.config.maxVotingTime +
governance.config.votingCoolOffTime -
Copy link
Contributor

Choose a reason for hiding this comment

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

votingCoolOffTime should be applied in both cases.
A better way to do this would be to rename maxVotingTime to baseVotingTime and then have a function for maxVotingTime -> baseVotingTime + votingCoolOffTime

@ochaloup
Copy link
Author

@SebastianBor thanks for the review. I updated the pull request trying to follow your point. Please take a look.

  • I'm not sure about maxVotingTime setter for backwards compatibility reasons. Decided to not to add but not sure.

@ochaloup
Copy link
Author

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