Human View
The bump fee discount (summed_bump_fees - combined_bump_fee) can become negative when the mempool state changes between the two MiniMiner calculations. Each MiniMiner only holds cs_main for the duration of its constructor, so fee deltas, new transactions, or evictions in between cause the values to diverge.
When the combined fee exceeds the sum of individual fees, the difference is negative. The truthiness check if (bump_fee_overestimate) passes (non-zero), and SetBumpFeeDiscount hits assert(discount >= 0), crashing the node.
Fix: Change the condition from if (bump_fee_overestimate) to if (bump_fee_overestimate > 0) so negative overestimates are simply skipped. The discount is a waste-metric optimisation, not a correctness requirement.
Fixes #34232
AI View (DCCE Protocol v1.0)
Metadata
- Generator: Claude (Anthropic) via Cursor IDE
- Methodology: AI-assisted development with human oversight and review
AI Contribution Summary
- Solution design and implementation
Verification Steps Performed
- Reproduced the reported issue
- Analyzed source code to identify root cause
- Implemented and tested the fix
Human Review Guidance
- Review the implementation for correctness and completeness
- Verify test coverage matches the described scenarios
Made with M7 Cursor