mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Allow fee calculation to happen off-chain (#6076)
* Emit a PaymentParameters event once per block This contains per-block paramaters need to calculate fees off-chain. * Add WeightToFee trait * Add documentation to polynomial types * Ignore pseudo code snippet for doc tests * Use `Mul` implementation of Perbill * Add tests for WeightToFeePolynomial * Revert "Emit a PaymentParameters event once per block" This reverts commit 6c4763baff3d8179676a3c1660fe7063fd56a8ca. Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
committed by
GitHub
parent
e04f237152
commit
9dd21b1eed
@@ -37,7 +37,7 @@ use frame_support::{
|
||||
assert_ok, assert_err, assert_err_ignore_postinfo, impl_outer_dispatch, impl_outer_event,
|
||||
impl_outer_origin, parameter_types,
|
||||
storage::child, StorageMap, StorageValue, traits::{Currency, Get},
|
||||
weights::{DispatchInfo, DispatchClass, Weight, PostDispatchInfo, Pays},
|
||||
weights::{DispatchInfo, DispatchClass, Weight, PostDispatchInfo, Pays, IdentityFee},
|
||||
};
|
||||
use std::{cell::RefCell, sync::atomic::{AtomicUsize, Ordering}};
|
||||
use sp_core::storage::well_known_keys;
|
||||
@@ -152,7 +152,7 @@ impl pallet_transaction_payment::Trait for Test {
|
||||
type Currency = Balances;
|
||||
type OnTransactionPayment = ();
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = Test;
|
||||
type WeightToFee = IdentityFee<BalanceOf<Self>>;
|
||||
type FeeMultiplierUpdate = ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user