Skip to content

Commit

Permalink
Set a default gas policy
Browse files Browse the repository at this point in the history
  • Loading branch information
nambrot committed Oct 21, 2023
1 parent 6769f55 commit e6791b9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions rust/agents/relayer/src/msg/gas_payment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ pub struct GasPaymentEnforcer {
}

impl GasPaymentEnforcer {
pub fn new(
policy_configs: impl IntoIterator<Item = GasPaymentEnforcementConf>,
db: HyperlaneRocksDB,
) -> Self {
pub fn new(policy_configs: Vec<GasPaymentEnforcementConf>, db: HyperlaneRocksDB) -> Self {
if policy_configs.len() == 0 {
return Self {
policies: vec![(Box::new(GasPaymentPolicyNone), MatchingList::default())],
db,
};
}
let policies = policy_configs
.into_iter()
.map(|cfg| {
Expand Down

0 comments on commit e6791b9

Please sign in to comment.