fix: don't resend block acceptance if already sent
The signer is currently sending an approval for every pre-commit that it receives after reaching the threshold weight. This change just makes sure it only sends its approval when it first reaches that threshold, and then ignores the rest of the pre-commits.
It turns out this is not as simple as I hoped.
Codecov Report
:x: Patch coverage is 42.85714% with 28 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 77.63%. Comparing base (c9003aa) to head (a30265c).
:warning: Report is 25 commits behind head on develop.
:x: Your project status has failed because the head coverage (77.63%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files
@@ Coverage Diff @@
## develop #6750 +/- ##
===========================================
- Coverage 77.90% 77.63% -0.27%
===========================================
Files 580 580
Lines 361187 361131 -56
===========================================
- Hits 281374 280371 -1003
- Misses 79813 80760 +947
| Files with missing lines | Coverage Δ | |
|---|---|---|
| stacks-common/src/util/macros.rs | 88.54% <ø> (ø) |
|
| ...tacks-node/src/tests/signer/commands/block_wait.rs | 23.76% <ø> (+23.76%) |
:arrow_up: |
| stackslib/src/net/api/postblock_proposal.rs | 67.03% <100.00%> (+0.15%) |
:arrow_up: |
| stacks-signer/src/v0/signer.rs | 74.03% <85.71%> (-0.57%) |
:arrow_down: |
| stacks-signer/src/signerdb.rs | 92.99% <85.71%> (+0.35%) |
:arrow_up: |
| stacks-node/src/tests/signer/v0.rs | 16.46% <0.00%> (+1.82%) |
:arrow_up: |
... and 86 files 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 dataPowered by Codecov. Last update c9003aa...a30265c. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.