Skip to content

Fix more race conditions detected by -race#2042

Merged
cffls merged 2 commits intodevelopfrom
fix_race_condition
Feb 6, 2026
Merged

Fix more race conditions detected by -race#2042
cffls merged 2 commits intodevelopfrom
fix_race_condition

Conversation

@cffls
Copy link
Copy Markdown
Contributor

@cffls cffls commented Feb 5, 2026

Description

Fix more race conditions detected by -race

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Cross repository changes

  • This PR requires changes to heimdall
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on amoy
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 65.82278% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.60%. Comparing base (0cca604) to head (8ec24c6).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
eth/tracers/api.go 70.83% 5 Missing and 2 partials ⚠️
core/state/database.go 50.00% 4 Missing ⚠️
miner/worker.go 66.66% 4 Missing ⚠️
metrics/metrics.go 0.00% 3 Missing ⚠️
internal/cli/flagset/flagset.go 71.42% 2 Missing ⚠️
internal/cli/server/server.go 66.66% 2 Missing ⚠️
metrics/sample.go 0.00% 0 Missing and 2 partials ⚠️
metrics/meter.go 0.00% 1 Missing ⚠️
metrics/resetting_timer.go 0.00% 0 Missing and 1 partial ⚠️
miner/miner.go 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (65.82%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2042      +/-   ##
===========================================
+ Coverage    49.57%   49.60%   +0.02%     
===========================================
  Files          873      873              
  Lines       150537   150595      +58     
===========================================
+ Hits         74636    74700      +64     
+ Misses       70866    70859       -7     
- Partials      5035     5036       +1     
Files with missing lines Coverage Δ
core/txpool/legacypool/list.go 91.00% <100.00%> (+0.13%) ⬆️
internal/cli/server/config.go 61.69% <100.00%> (ø)
miner/fake_miner.go 90.62% <100.00%> (+0.24%) ⬆️
metrics/meter.go 79.71% <0.00%> (ø)
metrics/resetting_timer.go 66.66% <0.00%> (ø)
miner/miner.go 72.35% <0.00%> (ø)
internal/cli/flagset/flagset.go 45.91% <71.42%> (+0.57%) ⬆️
internal/cli/server/server.go 29.06% <66.66%> (+0.15%) ⬆️
metrics/sample.go 87.91% <0.00%> (ø)
metrics/metrics.go 21.21% <0.00%> (ø)
... and 3 more

... and 18 files with indirect coverage changes

Files with missing lines Coverage Δ
core/txpool/legacypool/list.go 91.00% <100.00%> (+0.13%) ⬆️
internal/cli/server/config.go 61.69% <100.00%> (ø)
miner/fake_miner.go 90.62% <100.00%> (+0.24%) ⬆️
metrics/meter.go 79.71% <0.00%> (ø)
metrics/resetting_timer.go 66.66% <0.00%> (ø)
miner/miner.go 72.35% <0.00%> (ø)
internal/cli/flagset/flagset.go 45.91% <71.42%> (+0.57%) ⬆️
internal/cli/server/server.go 29.06% <66.66%> (+0.15%) ⬆️
metrics/sample.go 87.91% <0.00%> (ø)
metrics/metrics.go 21.21% <0.00%> (ø)
... and 3 more

... and 18 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cffls cffls force-pushed the fix_race_condition branch from 4b481c9 to 50848b1 Compare February 5, 2026 03:48
@claude
Copy link
Copy Markdown

claude bot commented Feb 5, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@cffls cffls force-pushed the fix_race_condition branch from 50848b1 to 7f45050 Compare February 5, 2026 18:17
@cffls cffls force-pushed the fix_race_condition branch from 7f45050 to 8ec24c6 Compare February 6, 2026 18:50
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

@lucca30 lucca30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for addressing the comments

@cffls cffls merged commit f5ee550 into develop Feb 6, 2026
19 of 22 checks passed
kamuikatsurgi pushed a commit that referenced this pull request Feb 13, 2026
* Fix more race conditions detected by -race

* Address comments
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.

3 participants