Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunxw committed Jul 26, 2023
1 parent e410631 commit 819c7f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions pallets/xvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::{pallet_prelude::*, traits::ConstU32, BoundedVec};
use frame_support::{ensure, pallet_prelude::*, traits::ConstU32, BoundedVec};
use pallet_evm::GasWeightMapping;
use parity_scale_codec::Decode;
use sp_core::U256;
Expand Down Expand Up @@ -90,12 +90,13 @@ impl<T: Config> Pallet<T> {
input: Vec<u8>,
skip_execution: bool,
) -> XvmCallResult {
if context.source_vm_id == vm_id {
return Err(CallErrorWithWeight {
ensure!(
context.source_vm_id != vm_id,
CallErrorWithWeight {
error: CallError::SameVmCallNotAllowed,
used_weight: PLACEHOLDER_WEIGHT,
});
}
}
);

match context.source_vm_id {
VmId::Evm => Pallet::<T>::evm_call(context, source, target, input, skip_execution),
Expand Down
1 change: 0 additions & 1 deletion precompiles/xvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ serde = { workspace = true }
precompile-utils = { workspace = true, features = ["testing"] }

pallet-balances = { workspace = true, features = ["std"] }
pallet-contracts = { workspace = true, features = ["std"] }
pallet-timestamp = { workspace = true }
sp-runtime = { workspace = true }

Expand Down

0 comments on commit 819c7f8

Please sign in to comment.