As I've checked the pallet-tx-payment
, I've figured it out the fee is withdrawn twice
pub fn validate() {
let (final_fee, _) = self.withdraw_fee(who, call, info, len)?;
...
}
pub fn pre_dispatch() {
let (_fee, imbalance) = self.withdraw_fee(who, call, info, len)?;
...
}
As far as I understand transaction life cycle
- Validate transaction and put into tx pool if valid (withdraw_fee)
pub fn validate_transaction {
...
Extra::validate_transaction();
}
- Block author fetch the valid transaction and dispatch tx(withdraw_fee)
fn apply_extrinsic() {
Extra::pre_dispatch();
...
}
Question: Is tx fee withdrawn twice for 'who' account? Once for during validating tx and once for pre-dispatching tx?
Thank you