Refs #40
File: crates/charon-core/src/profit.rs
PR branch: feat/15-profit-calc-and-queue
Problem:
Project pattern established in PR #27 and #28 reviews: all public structs in charon-core that represent data with potential future fields carry #[non_exhaustive]. ProfitInputs and NetProfit are public structs in charon-core. Likely future additions: mev_tip_cents (coinbase bribe for private mempool), priority_fee_cents (EIP-1559 tip), execution_risk_discount.
Without #[non_exhaustive], adding any field is a semver-breaking change that forces all struct-literal construction sites to update simultaneously.
Fix: Add #[non_exhaustive] to ProfitInputs and NetProfit. Update unit tests to use constructor functions or struct update syntax (..Default::default()) instead of exhaustive struct literals.
Refs #40
File: crates/charon-core/src/profit.rs
PR branch: feat/15-profit-calc-and-queue
Problem:
Project pattern established in PR #27 and #28 reviews: all public structs in charon-core that represent data with potential future fields carry #[non_exhaustive]. ProfitInputs and NetProfit are public structs in charon-core. Likely future additions: mev_tip_cents (coinbase bribe for private mempool), priority_fee_cents (EIP-1559 tip), execution_risk_discount.
Without #[non_exhaustive], adding any field is a semver-breaking change that forces all struct-literal construction sites to update simultaneously.
Fix: Add #[non_exhaustive] to ProfitInputs and NetProfit. Update unit tests to use constructor functions or struct update syntax (..Default::default()) instead of exhaustive struct literals.