(feat): disable pending block creation loop via flag #2175
Claude / Claude Code Review
completed
Apr 3, 2026 in 26m 13s
Code review found 1 potential issue
Found 3 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | miner/worker.go:860-863 |
DisablePendingBlock bypassed by Clique dev-mode else branch in txsCh handler |
Annotations
Check warning on line 863 in miner/worker.go
claude / Claude Code Review
DisablePendingBlock bypassed by Clique dev-mode else branch in txsCh handler
The `DisablePendingBlock` flag is bypassed in the `txsCh` handler's `else` branch: when `DisablePendingBlock=true` and `\!IsRunning()`, the guard at line 863 evaluates to false, causing fall-through into the else branch which contains an unguarded Clique Period=0 dev-mode path that calls `commitWork` unconditionally. On a non-running Clique dev-mode (Period=0) node with `DisablePendingBlock=true`, every incoming transaction event will still trigger pending snapshot creation. The fix is to add `\
Loading