diff --git a/rust/agents/relayer/src/msg/gas_payment/mod.rs b/rust/agents/relayer/src/msg/gas_payment/mod.rs index 4ed30c9572..132fc286c2 100644 --- a/rust/agents/relayer/src/msg/gas_payment/mod.rs +++ b/rust/agents/relayer/src/msg/gas_payment/mod.rs @@ -44,6 +44,8 @@ pub struct GasPaymentEnforcer { } impl GasPaymentEnforcer { + /// Note that `policy_configs` should not be empty. In the settings, + /// a default of vec![GasPaymentEnforcementConf::default()] is used. pub fn new( policy_configs: impl IntoIterator, db: HyperlaneRocksDB, diff --git a/rust/agents/relayer/src/settings/mod.rs b/rust/agents/relayer/src/settings/mod.rs index 4071154752..18ea52dddb 100644 --- a/rust/agents/relayer/src/settings/mod.rs +++ b/rust/agents/relayer/src/settings/mod.rs @@ -187,7 +187,7 @@ impl FromRawConf for RelayerSettings { matching_list, }) }).collect_vec() - }).unwrap_or_default(); + }).unwrap_or_else(|_| vec![GasPaymentEnforcementConf::default()]); let whitelist = p .chain(&mut err)