Replace bitmask with bitflags (#7159)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen
2020-10-29 20:19:59 +08:00
committed by GitHub
parent c8a245e5e0
commit bd450c24ff
15 changed files with 67 additions and 80 deletions
@@ -36,7 +36,7 @@ use sp_std::prelude::*;
use codec::{Encode, Decode};
use frame_support::{
decl_storage, decl_module,
traits::{Currency, Get, OnUnbalanced, ExistenceRequirement, WithdrawReason, Imbalance},
traits::{Currency, Get, OnUnbalanced, ExistenceRequirement, WithdrawReasons, Imbalance},
weights::{
Weight, DispatchInfo, PostDispatchInfo, GetDispatchInfo, Pays, WeightToFeePolynomial,
WeightToFeeCoefficient,
@@ -457,9 +457,9 @@ impl<T: Trait + Send + Sync> ChargeTransactionPayment<T> where
who,
fee,
if tip.is_zero() {
WithdrawReason::TransactionPayment.into()
WithdrawReasons::TRANSACTION_PAYMENT
} else {
WithdrawReason::TransactionPayment | WithdrawReason::Tip
WithdrawReasons::TRANSACTION_PAYMENT | WithdrawReasons::TIP
},
ExistenceRequirement::KeepAlive,
) {