Skip to content

Conversation

@Sukanto01899
Copy link

This change fixes vote snapshotting to always use the proposal’s creation block. Previously the snapshot block was computed using the current votingDelay, so if votingDelay was changed after a proposal was created, vote power could be calculated at the wrong block. Now each proposal stores creationBlock and voting uses that fixed block for consistent results.

Changes:
Add creationBlock to Proposal storage
Set it in propose()
Use it in castVoteInternal() for getPriorVotes
Note:

Storage layout change (new field added)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant