Skip to content

Commit

Permalink
Make weight_to_fee work in the solo chain (#219)
Browse files Browse the repository at this point in the history
It has been reported an issue
(use-ink/ink#1985) that weight_to_fee
always returns zero in end-to-end tests.
This pull request adds `type FeeMultiplierUpdate =
SlowAdjustingFeeUpdate<Self>` to make it work.
  • Loading branch information
smiasojed authored Nov 28, 2023
1 parent 2410dd3 commit f1d8389
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
sp-genesis-builder = { workspace = true }

# Polkadot
polkadot-runtime-common = { workspace = true }

# extra deps for setting up pallet-contracts
pallet-contracts = { workspace = true }
pallet-authorship = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mod contracts_config;

use frame_support::dispatch::DispatchClass;
use frame_system::limits::{BlockLength, BlockWeights};
use polkadot_runtime_common::SlowAdjustingFeeUpdate;
use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_runtime::{
Expand Down Expand Up @@ -269,7 +270,7 @@ impl pallet_transaction_payment::Config for Runtime {
type OperationalFeeMultiplier = ConstU8<5>;
type WeightToFee = IdentityFee<Balance>;
type LengthToFee = IdentityFee<Balance>;
type FeeMultiplierUpdate = ();
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
}

impl pallet_sudo::Config for Runtime {
Expand Down

0 comments on commit f1d8389

Please sign in to comment.