Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid add base cost twice
Browse files Browse the repository at this point in the history
xlc committed Sep 11, 2023
1 parent 8853822 commit 6878e18
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions runtime/common/src/precompile/liquid_crowdloan.rs
Original file line number Diff line number Diff line change
@@ -124,14 +124,11 @@ where
let read_account = InputPricer::<Runtime>::read_accounts(1);
let weight = <Runtime as module_liquid_crowdloan::Config>::WeightInfo::redeem();

Self::BASE_COST
.saturating_add(read_account)
.saturating_add(WeightToGas::convert(weight))
read_account.saturating_add(WeightToGas::convert(weight))
}
Action::GetRedeemCurrency => {
let weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);

Self::BASE_COST.saturating_add(WeightToGas::convert(weight))
WeightToGas::convert(weight)
}
};
Ok(Self::BASE_COST.saturating_add(cost))

0 comments on commit 6878e18

Please sign in to comment.