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

vms/platformvm: Change AdvanceTimeTo to modify passed-in parentState #2489

Merged
merged 29 commits into from
Jan 18, 2024

Conversation

dhrubabasu
Copy link
Contributor

Why this should be merged

Whenever we consume AdvanceTimeTo, we always apply the changes immediately. Let's move that into this function directly.

How this works

pretty straightforward

How this was tested

CI

@dhrubabasu dhrubabasu added the cleanup Code quality improvement label Dec 14, 2023
@dhrubabasu dhrubabasu added this to the v1.10.18 milestone Dec 14, 2023
@dhrubabasu dhrubabasu self-assigned this Dec 14, 2023
@dhrubabasu dhrubabasu changed the title vms/platformvm: Modify AdvanceTimeTo to modify passed-in stateDiff vms/platformvm: Change AdvanceTimeTo to modify passed-in stateDiff Dec 14, 2023
@dhrubabasu dhrubabasu changed the title vms/platformvm: Change AdvanceTimeTo to modify passed-in stateDiff vms/platformvm: Change AdvanceTimeTo to modify passed-in parentState Dec 14, 2023
Copy link
Contributor

@abi87 abi87 left a comment

Choose a reason for hiding this comment

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

lgtm. I think given the introducing of the NewDiffOn we can avoid the stateChanges struct

Copy link

@danlaine danlaine left a comment

Choose a reason for hiding this comment

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

Just some nits. Also, worth considering renaming this file from state_changes.go to advance_time.go or something.

vms/platformvm/block/builder/builder.go Outdated Show resolved Hide resolved
vms/platformvm/block/executor/verifier.go Outdated Show resolved Hide resolved
vms/platformvm/txs/executor/proposal_tx_executor.go Outdated Show resolved Hide resolved
vms/platformvm/txs/executor/state_changes.go Show resolved Hide resolved
@StephenButtolph StephenButtolph modified the milestones: v1.10.18, v1.10.19 Jan 16, 2024
@StephenButtolph StephenButtolph changed the base branch from dev to master January 18, 2024 21:10
@StephenButtolph StephenButtolph added this pull request to the merge queue Jan 18, 2024
Merged via the queue into master with commit eb18036 Jan 18, 2024
18 checks passed
@StephenButtolph StephenButtolph deleted the modify-AdvanceTimeTo branch January 18, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants