Skip to content

Conversation

roberto-bayardo
Copy link
Collaborator

The root stability tests require Sha256, so no point in allowing the hasher to be parameterized.

Copy link
Contributor

@Copilot 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 simplifies root tester helpers by removing the generic hasher parameter and hard-coding Sha256, then updates call sites accordingly.

  • Removed generic <H: CHasher> from batched root test helpers and instantiated a Sha256 hasher inside each helper.
  • Updated all test invocations in mem.rs and journaled.rs to match the new helper signatures.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
storage/src/mmr/tests/mod.rs Dropped generic hasher type, now creates a Sha256 + Standard hasher internally
storage/src/mmr/mem.rs Updated call to build_batched_and_check_test_roots (removed hasher arg)
storage/src/mmr/journaled.rs Updated call to build_batched_and_check_test_roots_journaled

@commonwarexyz commonwarexyz deleted a comment from Copilot AI Jun 2, 2025
@patrick-ogrady patrick-ogrady merged commit 415899a into main Jun 2, 2025
17 checks passed
@patrick-ogrady patrick-ogrady deleted the clean_up_root_test branch June 2, 2025 23:14
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.03%. Comparing base (f074b74) to head (2673648).
Report is 2 commits behind head on main.

@@            Coverage Diff             @@
##             main    #1046      +/-   ##
==========================================
- Coverage   91.03%   91.03%   -0.01%     
==========================================
  Files         191      191              
  Lines       54359    54357       -2     
==========================================
- Hits        49485    49482       -3     
- Misses       4874     4875       +1     
Files with missing lines Coverage Δ
storage/src/mmr/journaled.rs 98.12% <100.00%> (ø)
storage/src/mmr/mem.rs 96.75% <100.00%> (-0.02%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f074b74...2673648. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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