Skip to content

Commit

Permalink
fix xcm to evm encoded tx len
Browse files Browse the repository at this point in the history
  • Loading branch information
tgmichel committed May 31, 2023
1 parent 73d2185 commit 93bee9e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions pallets/ethereum-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,6 @@ pub mod pallet {
}

impl<T: Config> Pallet<T> {
fn transaction_len(transaction: &Transaction) -> u64 {
transaction
.encode()
.len()
// pallet + call indexes
.saturating_add(2) as u64
}

fn validate_and_apply(
source: H160,
xcm_transaction: EthereumXcmTransaction,
Expand All @@ -262,10 +254,7 @@ impl<T: Config> Pallet<T> {
transaction_data.gas_limit.unique_saturated_into(),
true,
) {
weight_limit if weight_limit.proof_size() > 0 => (
Some(weight_limit),
Some(Self::transaction_len(&transaction)),
),
weight_limit if weight_limit.proof_size() > 0 => (Some(weight_limit), Some(0)),
_ => (None, None),
};

Expand Down

0 comments on commit 93bee9e

Please sign in to comment.