Browse Source

runtime: fix test warnings

conectado 4 years ago
parent
commit
785f60c146
2 changed files with 1 additions and 18 deletions
  1. 1 16
      runtime/src/integration/transactions.rs
  2. 0 2
      runtime/src/tests/fee_tests.rs

+ 1 - 16
runtime/src/integration/transactions.rs

@@ -1,27 +1,12 @@
 use codec::Encode;
 use frame_support::debug;
-use frame_support::weights::{WeightToFeeCoefficients, WeightToFeePolynomial};
 use sp_runtime::generic;
 use sp_runtime::generic::SignedPayload;
 use sp_runtime::SaturatedConversion;
 
-use crate::{AccountId, Balance, BlockHashCount, Index, SignedExtra, UncheckedExtrinsic};
+use crate::{AccountId, BlockHashCount, Index, SignedExtra, UncheckedExtrinsic};
 use crate::{Call, Runtime, System};
 
-/// Stub for zero transaction weights.
-pub struct NoWeights;
-impl WeightToFeePolynomial for NoWeights {
-    type Balance = Balance;
-
-    fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
-        Default::default()
-    }
-
-    fn calc(_weight: &u64) -> Self::Balance {
-        Default::default()
-    }
-}
-
 /// 'Create transaction' default implementation.
 pub(crate) fn create_transaction<
     C: frame_system::offchain::AppCrypto<

+ 0 - 2
runtime/src/tests/fee_tests.rs

@@ -2,8 +2,6 @@ use super::initial_test_ext;
 use crate::constants::currency::{CENTS, DOLLARS};
 use crate::MaximumBlockWeight;
 use crate::Runtime;
-use frame_support::weights::WeightToFeePolynomial;
-use pallet_balances::WeightInfo;
 use pallet_transaction_payment::Module as TransactionPayment;
 
 #[test]