Skip to content

Commit

Permalink
rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayevbeosa Iyamu committed Jan 15, 2025
1 parent b1ff882 commit 52a4281
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 60 deletions.
40 changes: 20 additions & 20 deletions polkadot/xcm/xcm-builder/src/barriers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ use xcm_executor::traits::{CheckSuspension, OnResponse, Properties, ShouldExecut
pub struct TakeWeightCredit;
impl ShouldExecute for TakeWeightCredit {
fn should_execute<RuntimeCall>(
_origin: &Location,
_instructions: &mut [Instruction<RuntimeCall>],
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
max_weight: Weight,
properties: &mut Properties,
) -> Result<(), ProcessMessageError> {
tracing::trace!(
target: "xcm::barriers",
origin = ?_origin,
instructions = ?_instructions,
?origin,
?instructions,
?max_weight,
?properties,
"TakeWeightCredit"
Expand All @@ -69,14 +69,14 @@ impl<T: Contains<Location>> ShouldExecute for AllowTopLevelPaidExecutionFrom<T>
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
max_weight: Weight,
_properties: &mut Properties,
properties: &mut Properties,
) -> Result<(), ProcessMessageError> {
tracing::trace!(
target: "xcm::barriers",
?origin,
?instructions,
?max_weight,
properties = ?_properties,
?properties,
"AllowTopLevelPaidExecutionFrom",
);

Expand Down Expand Up @@ -288,12 +288,12 @@ impl<T: Contains<Location>> ShouldExecute for AllowUnpaidExecutionFrom<T> {
fn should_execute<RuntimeCall>(
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
_max_weight: Weight,
_properties: &mut Properties,
max_weight: Weight,
properties: &mut Properties,
) -> Result<(), ProcessMessageError> {
tracing::trace!(
target: "xcm::barriers",
?origin, ?instructions, max_weight = ?_max_weight, properties = ?_properties,
?origin, ?instructions, ?max_weight, ?properties,
"AllowUnpaidExecutionFrom"
);
ensure!(T::contains(origin), ProcessMessageError::Unsupported);
Expand All @@ -311,11 +311,11 @@ impl<T: Contains<Location>> ShouldExecute for AllowExplicitUnpaidExecutionFrom<T
origin: &Location,
instructions: &mut [Instruction<Call>],
max_weight: Weight,
_properties: &mut Properties,
properties: &mut Properties,
) -> Result<(), ProcessMessageError> {
tracing::trace!(
target: "xcm::barriers",
?origin, ?instructions, ?max_weight, properties = ?_properties,
?origin, ?instructions, ?max_weight, ?properties,
"AllowExplicitUnpaidExecutionFrom",
);
ensure!(T::contains(origin), ProcessMessageError::Unsupported);
Expand Down Expand Up @@ -369,12 +369,12 @@ impl<ResponseHandler: OnResponse> ShouldExecute for AllowKnownQueryResponses<Res
fn should_execute<RuntimeCall>(
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
_max_weight: Weight,
_properties: &mut Properties,
max_weight: Weight,
properties: &mut Properties,
) -> Result<(), ProcessMessageError> {
tracing::trace!(
target: "xcm::barriers",
?origin, ?instructions, max_weight = ?_max_weight, properties = ?_properties,
?origin, ?instructions, ?max_weight, ?properties,
"AllowKnownQueryResponses"
);
instructions
Expand All @@ -397,12 +397,12 @@ impl<T: Contains<Location>> ShouldExecute for AllowSubscriptionsFrom<T> {
fn should_execute<RuntimeCall>(
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
_max_weight: Weight,
_properties: &mut Properties,
max_weight: Weight,
properties: &mut Properties,
) -> Result<(), ProcessMessageError> {
tracing::trace!(
target: "xcm::barriers",
?origin, ?instructions, max_weight = ?_max_weight, properties = ?_properties,
?origin, ?instructions, ?max_weight, ?properties,
"AllowSubscriptionsFrom",
);
ensure!(T::contains(origin), ProcessMessageError::Unsupported);
Expand All @@ -428,12 +428,12 @@ impl ShouldExecute for AllowHrmpNotificationsFromRelayChain {
fn should_execute<RuntimeCall>(
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
_max_weight: Weight,
_properties: &mut Properties,
max_weight: Weight,
properties: &mut Properties,
) -> Result<(), ProcessMessageError> {
tracing::trace!(
target: "xcm::barriers",
?origin, ?instructions, max_weight = ?_max_weight, properties = ?_properties,
?origin, ?instructions, ?max_weight, ?properties,
"AllowHrmpNotificationsFromRelayChain"
);
// accept only the Relay Chain
Expand Down
16 changes: 8 additions & 8 deletions polkadot/xcm/xcm-builder/src/currency_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ impl<
> TransactAsset
for CurrencyAdapter<Currency, Matcher, AccountIdConverter, AccountId, CheckedAccount>
{
fn can_check_in(_origin: &Location, what: &Asset, _context: &XcmContext) -> Result {
tracing::trace!(target: "xcm::currency_adapter", origin = ?_origin, ?what, "can_check_in origin",);
fn can_check_in(origin: &Location, what: &Asset, _context: &XcmContext) -> Result {
tracing::trace!(target: "xcm::currency_adapter", ?origin, ?what, "can_check_in origin",);
// Check we handle this asset.
let amount: Currency::Balance =
Matcher::matches_fungible(what).ok_or(Error::AssetNotHandled)?;
Expand All @@ -156,8 +156,8 @@ impl<
}
}

fn check_in(_origin: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(target: "xcm::currency_adapter", origin = ?_origin, ?what, "check_in origin");
fn check_in(origin: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(target: "xcm::currency_adapter", ?origin, ?what, "check_in origin");
if let Some(amount) = Matcher::matches_fungible(what) {
match CheckedAccount::get() {
Some((checked_account, MintLocation::Local)) =>
Expand All @@ -169,8 +169,8 @@ impl<
}
}

fn can_check_out(_dest: &Location, what: &Asset, _context: &XcmContext) -> Result {
tracing::trace!(target: "xcm::currency_adapter", dest = ?_dest, ?what, "can_check_out",);
fn can_check_out(dest: &Location, what: &Asset, _context: &XcmContext) -> Result {
tracing::trace!(target: "xcm::currency_adapter", ?dest, ?what, "can_check_out",);
let amount = Matcher::matches_fungible(what).ok_or(Error::AssetNotHandled)?;
match CheckedAccount::get() {
Some((checked_account, MintLocation::Local)) =>
Expand All @@ -181,8 +181,8 @@ impl<
}
}

fn check_out(_dest: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(target: "xcm::currency_adapter", dest = ?_dest, ?what, "check_out",);
fn check_out(dest: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(target: "xcm::currency_adapter", ?dest, ?what, "check_out",);
if let Some(amount) = Matcher::matches_fungible(what) {
match CheckedAccount::get() {
Some((checked_account, MintLocation::Local)) =>
Expand Down
16 changes: 8 additions & 8 deletions polkadot/xcm/xcm-builder/src/fungible_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ impl<
> TransactAsset
for FungibleMutateAdapter<Fungible, Matcher, AccountIdConverter, AccountId, CheckingAccount>
{
fn can_check_in(_origin: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
fn can_check_in(origin: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
tracing::trace!(
target: "xcm::fungible_adapter",
origin = ?_origin, ?what,
?origin, ?what,
"can_check_in origin",
);
// Check we handle this asset
Expand All @@ -135,10 +135,10 @@ impl<
}
}

fn check_in(_origin: &Location, what: &Asset, _context: &XcmContext) {
fn check_in(origin: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(
target: "xcm::fungible_adapter",
origin = ?_origin, ?what,
?origin, ?what,
"check_in origin",
);
if let Some(amount) = Matcher::matches_fungible(what) {
Expand All @@ -152,10 +152,10 @@ impl<
}
}

fn can_check_out(_dest: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
fn can_check_out(dest: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
tracing::trace!(
target: "xcm::fungible_adapter",
dest = ?_dest,
?dest,
?what,
"can_check_out",
);
Expand All @@ -169,10 +169,10 @@ impl<
}
}

fn check_out(_dest: &Location, what: &Asset, _context: &XcmContext) {
fn check_out(dest: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(
target: "xcm::fungible_adapter",
dest = ?_dest,
?dest,
?what,
"check_out",
);
Expand Down
16 changes: 8 additions & 8 deletions polkadot/xcm/xcm-builder/src/fungibles_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ impl<
CheckingAccount,
>
{
fn can_check_in(_origin: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
fn can_check_in(origin: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
tracing::trace!(
target: "xcm::fungibles_adapter",
origin = ?_origin, ?what,
?origin, ?what,
"can_check_in",
);
// Check we handle this asset.
Expand All @@ -223,10 +223,10 @@ impl<
}
}

fn check_in(_origin: &Location, what: &Asset, _context: &XcmContext) {
fn check_in(origin: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(
target: "xcm::fungibles_adapter",
origin = ?_origin, ?what,
?origin, ?what,
"check_in",
);
if let Ok((asset_id, amount)) = Matcher::matches_fungibles(what) {
Expand All @@ -240,10 +240,10 @@ impl<
}
}

fn can_check_out(_origin: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
fn can_check_out(origin: &Location, what: &Asset, _context: &XcmContext) -> XcmResult {
tracing::trace!(
target: "xcm::fungibles_adapter",
origin = ?_origin, ?what,
?origin, ?what,
"can_check_out",
);
// Check we handle this asset.
Expand All @@ -257,10 +257,10 @@ impl<
}
}

fn check_out(_dest: &Location, what: &Asset, _context: &XcmContext) {
fn check_out(dest: &Location, what: &Asset, _context: &XcmContext) {
tracing::trace!(
target: "xcm::fungibles_adapter",
dest = ?_dest, ?what,
?dest, ?what,
"check_out",
);
if let Ok((asset_id, amount)) = Matcher::matches_fungibles(what) {
Expand Down
16 changes: 8 additions & 8 deletions polkadot/xcm/xcm-builder/src/nonfungible_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ impl<
> TransactAsset
for NonFungibleMutateAdapter<NonFungible, Matcher, AccountIdConverter, AccountId, CheckingAccount>
{
fn can_check_in(_origin: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
fn can_check_in(origin: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
tracing::trace!(
target: LOG_TARGET,
origin = ?_origin,
?origin,
?what,
?context,
"can_check_in",
Expand All @@ -138,10 +138,10 @@ impl<
}
}

fn check_in(_origin: &Location, what: &Asset, context: &XcmContext) {
fn check_in(origin: &Location, what: &Asset, context: &XcmContext) {
tracing::trace!(
target: LOG_TARGET,
origin = ?_origin,
?origin,
?what,
?context,
"check_in",
Expand All @@ -158,10 +158,10 @@ impl<
}
}

fn can_check_out(_dest: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
fn can_check_out(dest: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
tracing::trace!(
target: LOG_TARGET,
dest = ?_dest,
?dest,
?what,
?context,
"can_check_out",
Expand All @@ -178,10 +178,10 @@ impl<
}
}

fn check_out(_dest: &Location, what: &Asset, context: &XcmContext) {
fn check_out(dest: &Location, what: &Asset, context: &XcmContext) {
tracing::trace!(
target: LOG_TARGET,
dest = ?_dest,
?dest,
?what,
?context,
"check_out",
Expand Down
16 changes: 8 additions & 8 deletions polkadot/xcm/xcm-builder/src/nonfungibles_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ impl<
CheckingAccount,
>
{
fn can_check_in(_origin: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
fn can_check_in(origin: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
tracing::trace!(
target: LOG_TARGET,
origin = ?_origin,
?origin,
?what,
?context,
"can_check_in",
Expand All @@ -158,10 +158,10 @@ impl<
}
}

fn check_in(_origin: &Location, what: &Asset, context: &XcmContext) {
fn check_in(origin: &Location, what: &Asset, context: &XcmContext) {
tracing::trace!(
target: LOG_TARGET,
origin = ?_origin,
?origin,
?what,
?context,
"check_in",
Expand All @@ -177,10 +177,10 @@ impl<
}
}

fn can_check_out(_dest: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
fn can_check_out(dest: &Location, what: &Asset, context: &XcmContext) -> XcmResult {
tracing::trace!(
target: LOG_TARGET,
dest = ?_dest,
?dest,
?what,
?context,
"can_check_out",
Expand All @@ -196,10 +196,10 @@ impl<
}
}

fn check_out(_dest: &Location, what: &Asset, context: &XcmContext) {
fn check_out(dest: &Location, what: &Asset, context: &XcmContext) {
tracing::trace!(
target: LOG_TARGET,
dest = ?_dest,
?dest,
?what,
?context,
"check_out",
Expand Down

0 comments on commit 52a4281

Please sign in to comment.