Skip to content

feature: add locking of staking rewards #10

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

Closed
wants to merge 5 commits into from

Conversation

tac0turtle
Copy link

Description

This PR introduces locking of staking rewards in accordance with CIP-31.

closes CEL-58

Copy link

linear bot commented Mar 15, 2025


// For periodic vesting, distribute the new amount proportionally across existing periods
// or add a new period if the account's end time has passed
currentTime := time.Now().Unix()

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
@@ -105,7 +106,7 @@

bApp.Commit()

ctx := sdkCtx.WithBlockHeader(cmtproto.Header{ChainID: appName}).WithIsCheckTx(true)
ctx := sdkCtx.WithBlockHeader(cmtproto.Header{ChainID: appName, Time: time.Now().Round(0).UTC()}).WithIsCheckTx(true)

Check warning

Code scanning / CodeQL

Calling the system time Warning test

Calling the system time may be a possible source of non-determinism
@tac0turtle tac0turtle closed this Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant