Skip to content

Test insurance payout window circuit breaker - #1083

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Hibhee01:issue-1033-insurance-payout-window-tests
Sep 1, 2026
Merged

Test insurance payout window circuit breaker#1083
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Hibhee01:issue-1033-insurance-payout-window-tests

Conversation

@Hibhee01

Copy link
Copy Markdown

Overview

Adds regression coverage for the insurance payout circuit breaker's per-pool rolling payout window.

Related Issue

Closes #1033

Changes

  • Added helpers in the insurance circuit-breaker test module to create funded policies and process paid claims.
  • Covered an accepted payout at the configured daily limit.
  • Covered a second in-window payout rejected with DailyPayoutLimitExceeded.
  • Covered window expiry resetting get_pool_window_payout and allowing a new payout.

Verification Results

  • cargo +stable fmt -p propchain-insurance completed, with warnings because the repo's rustfmt config uses nightly-only options.
  • git diff --check passed.
  • cargo +stable test -p propchain-insurance could not complete locally because the Windows linker setup is missing MSVC system libraries for the repo-forced rust-lld linker:
    • rust-lld: error: could not open 'kernel32.lib': no such file or directory
    • same missing-library error for ntdll.lib, userenv.lib, ws2_32.lib, and dbghelp.lib

Acceptance Criteria

Criteria Status
Payout under the limit is accepted Done
Payout over the limit is rejected with DailyPayoutLimitExceeded Done
Window rollover resets the accumulator Done
cargo test -p propchain-insurance passes Blocked locally by Windows linker environment

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Hibhee01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit
nanaf6203-bit merged commit 58d412a into MettaChain:main Sep 1, 2026
1 check passed
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.

Insurance circuit-breaker payout window is untested: daily-payout limit and window rollover are uncovered

2 participants