Skip to content

Conversation

@StephenButtolph
Copy link
Contributor

Why this should be merged

Adds a test case to ensure that inactive L1 validators can have their weights modified correctly.

How this works

Adds another test vector.

How this was tested

CI

Need to be documented in RELEASES.md?

No.

@StephenButtolph StephenButtolph requested a review from Copilot May 1, 2025 15:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a test case to ensure that inactive L1 validators can have their weights updated correctly.

  • Introduces a new test vector titled "increase inactive weight" that simulates increasing the weight of an inactive validator.
  • Verifies that validator weight modifications work as expected for inactive L1 validators.
Comments suppressed due to low confidence (1)

vms/platformvm/state/state_test.go:1630

  • [nitpick] Consider adding explicit assertions within the test to verify that the inactive validator's weight has been correctly updated after processing the state change.
{

name: "increase inactive weight",
initial: []L1Validator{
{
ValidationID: l1Validator.ValidationID,
Copy link
Contributor

Choose a reason for hiding this comment

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

(No action required) For a future PR: ValidationID, SubnetID, NodeID and PublicKey rarely vary, maybe set in a case only when the default value should not be used and otherwise set in the test.

@StephenButtolph StephenButtolph added this pull request to the merge queue May 1, 2025
Merged via the queue into master with commit 0d45571 May 1, 2025
24 checks passed
@StephenButtolph StephenButtolph deleted the add-p-chain-state-test branch May 1, 2025 17:06
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.

4 participants