Replace bitmask with bitflags (#7159)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen authored and GitHub committed 2020-10-29 12:19:59 +00:00
1 parent c8a245e5e0
commit bd450c24ff
15 files changed
+67 -80

No files matched your search

@@ -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,
) {