Skip to content
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 vesting file (old timestamp) #3654

Merged
merged 3 commits into from
Mar 8, 2023
Merged

Fix vesting file (old timestamp) #3654

merged 3 commits into from
Mar 8, 2023

Conversation

modship
Copy link
Member

@modship modship commented Mar 6, 2023

  • document all added functions
  • try in sandbox /simulation/labnet
  • unit tests on the added/changed features
    • make tests compile
    • make tests pass
  • add logs allowing easy debugging in case the changes caused problems
  • if the API has changed, update the API specification

Fix #3651

@modship modship changed the base branch from testnet_20 to testnet_21 March 6, 2023 21:47

Ok(prev)
})
// we don't need range with StartSlot(0,0) && EndSlot(0,0)
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the range with the start timestamp at genesis otherwise from genesis to X there is no vesting.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we have it, my filter is && not ||.

Here we don't want vesting range with start_slot(0,0) and end_slot(0,0).
This happens when the timestamp in vesting_file is passed for the first launch of BC. There is no block at the timestamp.

So the next range (and the first in the map) has start_slot(0,0) and end_slot(Slot valide timestamp).

Sorry if i don't explain well

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem.

Copy link
Contributor

@AurelienFT AurelienFT left a comment

Choose a reason for hiding this comment

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

Nice fix

@modship modship merged commit ffeab4b into testnet_21 Mar 8, 2023
modship pushed a commit that referenced this pull request Mar 8, 2023
bors bot added a commit that referenced this pull request Mar 8, 2023
3659: fix vesting file (#3654) r=AurelienFT a=modship

* [X] document all added functions
* [X] try in sandbox /simulation/labnet
* [X] unit tests on the added/changed features
  * [X] make tests compile
  * [X] make tests pass 
* [X] add logs allowing easy debugging in case the changes caused problems
* [X] if the API has changed, update the API specification

Co-authored-by: modship <lu@massa.net>
modship added a commit that referenced this pull request Mar 20, 2023
* fix(vesting) : fix init slot with passed timestamp #3654
modship added a commit that referenced this pull request Mar 20, 2023
* fix(vesting) : fix init slot with passed timestamp #3654
@AurelienFT AurelienFT deleted the fix/init_vesting_file branch May 29, 2023 09:31
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.

2 participants