Skip to content

feat: add --test-mode-block-weight CLI flag#1609

Merged
tuliomir merged 1 commit intomasterfrom
feature/test-mode-block-weight
Mar 2, 2026
Merged

feat: add --test-mode-block-weight CLI flag#1609
tuliomir merged 1 commit intomasterfrom
feature/test-mode-block-weight

Conversation

@tuliomir
Copy link
Contributor

@tuliomir tuliomir commented Mar 2, 2026

Motivation

External tests for repositories that depend on the Hathor Core should also have access to the TestMode.TEST_BLOCK_WEIGHT that is used in its internal tests. See RFC 102 for a concrete use case and explanations.

Acceptance Criteria

  • Expose the existing TestMode.TEST_BLOCK_WEIGHT via a CLI flag, making block mining trivial (weight=1) for integration testing. Requires --unsafe-mode, same as --test-mode-tx-weight.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

Expose the existing TestMode.TEST_BLOCK_WEIGHT via a CLI flag,
making block mining trivial (weight=1) for integration testing.
Requires --unsafe-mode, same as --test-mode-tx-weight.
@tuliomir tuliomir requested a review from glevco March 2, 2026 20:19
@tuliomir tuliomir self-assigned this Mar 2, 2026
@tuliomir tuliomir added the enhancement New feature or request label Mar 2, 2026
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

🐰 Bencher Report

Branchfeature/test-mode-block-weight
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
1.61 m
(-6.17%)Baseline: 1.71 m
1.54 m
(95.92%)
2.05 m
(78.19%)
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.65%. Comparing base (468c246) to head (063e54d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1609      +/-   ##
==========================================
+ Coverage   85.62%   85.65%   +0.03%     
==========================================
  Files         439      439              
  Lines       33515    33515              
  Branches     5264     5264              
==========================================
+ Hits        28697    28708      +11     
+ Misses       3803     3795       -8     
+ Partials     1015     1012       -3     
Flag Coverage Δ
test-lib 85.65% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@tuliomir tuliomir moved this from Todo to In Review (WIP) in Hathor Network Mar 2, 2026
@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Mar 2, 2026
@tuliomir tuliomir merged commit 9d036e3 into master Mar 2, 2026
33 checks passed
@tuliomir tuliomir deleted the feature/test-mode-block-weight branch March 2, 2026 22:26
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Mar 2, 2026
r4mmer added a commit that referenced this pull request Mar 3, 2026
… into feat/hathorlib-blueprint-move-2

* origin/feat/hathorlib-blueprint-move-2:
  feat: add --test-mode-block-weight CLI flag (#1609)
  fix[hathorlib]: Handling of /push-tx response (#1608)
@jansegre jansegre mentioned this pull request Mar 5, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Waiting to be deployed

Development

Successfully merging this pull request may close these issues.

3 participants