Summary
PR #43 adds priority_fee_gwei: u64 to ChainConfig in crates/charon-core/src/config.rs. ChainConfig is a public struct used in test fixtures across crates. It does not carry #[non_exhaustive].
Every time a new chain-level config field is added (as happened here), any downstream code that constructs ChainConfig { chain_id, ws_url, http_url } by name fails to compile. The fix requires touching every test fixture instead of one struct annotation.
The established codebase pattern is to mark public structs with growing field sets as #[non_exhaustive] (types.rs, PR #27).
File
crates/charon-core/src/config.rs — ChainConfig struct (line ~64 on main)
Fix
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct ChainConfig {
pub chain_id: u64,
pub ws_url: String,
pub http_url: String,
#[serde(default = "default_priority_fee_gwei")]
pub priority_fee_gwei: u64,
}
fn default_priority_fee_gwei() -> u64 { 1 }
Update any test fixtures that construct ChainConfig by struct literal to use a builder or ..Default::default().
Refs #43
Summary
PR #43 adds
priority_fee_gwei: u64toChainConfigincrates/charon-core/src/config.rs.ChainConfigis a public struct used in test fixtures across crates. It does not carry#[non_exhaustive].Every time a new chain-level config field is added (as happened here), any downstream code that constructs
ChainConfig { chain_id, ws_url, http_url }by name fails to compile. The fix requires touching every test fixture instead of one struct annotation.The established codebase pattern is to mark public structs with growing field sets as
#[non_exhaustive](types.rs, PR #27).File
crates/charon-core/src/config.rs—ChainConfigstruct (line ~64 on main)Fix
Update any test fixtures that construct
ChainConfigby struct literal to use a builder or..Default::default().Refs #43