Skip to content

Refactor chain- and epoch-specific state manager tests into a dedicated file #7723

Open

Description

@coderabbitai

Summary

Move chain- and epoch-specific tests out of src/state_manager/utils.rs into a dedicated test file or test module. This is a follow-up refactor to PR #7709. It does not change state manager or RPC behavior.

Rationale

src/state_manager/utils.rs contains state-computation helpers and tests for specific network epochs. A dedicated test file will separate these responsibilities and make the snapshot-based tests easier to find and maintain.

Required changes

  • Move cargo_test_reward_distribution_calibnet_4109134 into a dedicated test file or test module.
  • Move the related chain- and epoch-specific replay and state-validation tests from state_compute::tests into the dedicated test organization.
  • Review the generated state-computation test inclusion and keep generated tests discoverable.
  • Keep reusable snapshot download and state preparation helpers available to the moved tests.
  • Preserve test names, assertions, Tokio runtime settings, and #[fickle::fickle] annotations.

Affected areas

  • src/state_manager/utils.rs, particularly state_compute::tests.
  • The new dedicated state manager test file or test module.
  • Test module declarations and generated-test inclusion, as needed.

Acceptance criteria

  • Chain- and epoch-specific tests no longer reside in src/state_manager/utils.rs.
  • The moved tests remain discoverable and retain their existing coverage.
  • Snapshot loading, state-root checks, reward accounting assertions, and cache assertions remain unchanged.
  • Relevant tests pass under the existing test workflow.
  • No production state manager or RPC behavior changes.

References

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions