Skip to content

Conversation

@yomanthunder
Copy link

Fixes #664

Summary

Validates fidelity timelock constraints at configuration time to prevent
makers from starting with an invalid fidelity bond setup.

Changes

  • Introduces minimum and maximum allowed fidelity timelocks (in blocks)
  • Enforces validation during MakerConfig::new() construction
  • Makes fidelity_redeemscript private within the fidelity module
  • Moves fidelity verification logic into wallet/fidelity.rs
  • Preserves existing watcher behavior (no functional changes)

Introduce maximum and minimum allowed fidelity timelocks in blocks
Ensuring MakerConfig::new() returns a valid configuration
Moves fidelity verification logic out of utils and into wallet/fidelity,
allowing fidelity_redeemscript to remain private and enforcing module
boundaries.
@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 90.80460% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.90%. Comparing base (776b75d) to head (ba667bd).
⚠️ Report is 65 commits behind head on master.

Files with missing lines Patch % Lines
src/wallet/fidelity.rs 90.90% 4 Missing ⚠️
src/maker/api2.rs 40.00% 3 Missing ⚠️
src/maker/config.rs 97.36% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #667      +/-   ##
==========================================
+ Coverage   68.87%   77.90%   +9.03%     
==========================================
  Files          35       49      +14     
  Lines        4932    14495    +9563     
==========================================
+ Hits         3397    11293    +7896     
- Misses       1535     3202    +1667     

☔ 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.

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.

[fiddelity] Limit for maximum and minumum timelock

1 participant