Skip to content

Commit

Permalink
Use new_if_pallet_present in the IDP creation to allow testing migrat…
Browse files Browse the repository at this point in the history
…ion guide
  • Loading branch information
LGLO committed Dec 18, 2024
1 parent 9a94f42 commit 1919ea7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions node/src/inherent_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ where
"SIDECHAIN_BLOCK_BENEFICIARY",
)?;

#[cfg(not(test))]
let native_token = NativeTokenIDP::new_if_pallet_present(
client.clone(),
native_token_data_source.as_ref(),
mc_hash.mc_hash(),
parent_hash,
)
.await?;
#[cfg(test)]
let native_token = NativeTokenIDP::new(
client.clone(),
native_token_data_source.as_ref(),
Expand Down Expand Up @@ -191,6 +200,15 @@ where
)
.await?;

#[cfg(not(test))]
let native_token = NativeTokenIDP::new_if_pallet_present(
client.clone(),
native_token_data_source.as_ref(),
mc_hash,
parent_hash,
)
.await?;
#[cfg(test)]
let native_token = NativeTokenIDP::new(
client.clone(),
native_token_data_source.as_ref(),
Expand Down

0 comments on commit 1919ea7

Please sign in to comment.