Skip to content

Commit

Permalink
Fix try-runtime (#223)
Browse files Browse the repository at this point in the history
* Try fix

* Try fix

* Adjust toml file

* Fix compile

* Foramat
  • Loading branch information
boundless-forest authored Jan 19, 2023
1 parent 3ad6cc8 commit 668fde3
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 17 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ runtime-benchmarks = [

try-runtime = [
# darwinia
"crab-runtime/try-runtime",
"darwinia-runtime/try-runtime",
"pangolin-runtime/try-runtime",

# substrate
"try-runtime-cli/try-runtime",
Expand Down
2 changes: 2 additions & 0 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ pub fn run() -> Result<()> {
},
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime(cmd)) => {
use sc_service::TaskManager;

let runner = cli.create_runner(cmd)?;
let chain_spec = &runner.config().chain_spec;

Expand Down
2 changes: 2 additions & 0 deletions pallet/account-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ std = [
"sp-runtime/std",
"sp-std/std",
]

try-runtime = ["frame-support/try-runtime"]
3 changes: 2 additions & 1 deletion pallet/deposit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ std = [
"sp-std/std",
]

# TODO: runtime-benchmarks, try-runtime
# TODO: runtime-benchmarks
try-runtime = ["frame-support/try-runtime"]
2 changes: 2 additions & 0 deletions pallet/ecdsa-authority/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ std = [
"sp-std/std",
"sp-io/std",
]

try-runtime = ["frame-support/try-runtime"]
2 changes: 2 additions & 0 deletions pallet/message-gadget/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ std = [
"sp-core/std",
"sp-io/std",
]

try-runtime = ["frame-support/try-runtime"]
2 changes: 2 additions & 0 deletions pallet/message-transact/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ std = [
"sp-runtime/std",
"sp-std/std",
]

try-runtime = ["frame-support/try-runtime"]
3 changes: 2 additions & 1 deletion pallet/staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ std = [
"sp-std/std",
]

# TODO: runtime-benchmarks, try-runtime
# TODO: runtime-benchmarks
try-runtime = ["frame-support/try-runtime"]
3 changes: 2 additions & 1 deletion runtime/common/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ macro_rules! impl_account_migration_tests {
let (from, from_pk) = alice();
let mut truncated_from = [0_u8; 20];

truncated_from.copy_from_slice(&<AccountId32 as AsRef<[u8; 32]>>::as_ref(&from_pk)[..20]);
truncated_from
.copy_from_slice(&<AccountId32 as AsRef<[u8; 32]>>::as_ref(&from_pk)[..20]);

let to = H160::from_low_u64_be(255).into();

Expand Down
15 changes: 15 additions & 0 deletions runtime/crab/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,21 @@ try-runtime = [
"cumulus-pallet-xcmp-queue/try-runtime",
"parachain-info/try-runtime",

# darwinia
"darwinia-account-migration/try-runtime",
"darwinia-deposit/try-runtime",
"darwinia-ecdsa-authority/try-runtime",
"darwinia-message-gadget/try-runtime",
"darwinia-message-transact/try-runtime",
"darwinia-staking/try-runtime",

# darwinia-messages-substrate
"pallet-bridge-dispatch/try-runtime",
"pallet-bridge-grandpa/try-runtime",
"pallet-bridge-messages/try-runtime",
"pallet-bridge-parachains/try-runtime",
"pallet-fee-market/try-runtime",

# frontier
"pallet-ethereum/try-runtime",
"pallet-evm/try-runtime",
Expand Down
15 changes: 15 additions & 0 deletions runtime/darwinia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,21 @@ try-runtime = [
"cumulus-pallet-xcmp-queue/try-runtime",
"parachain-info/try-runtime",

# darwinia
"darwinia-account-migration/try-runtime",
"darwinia-deposit/try-runtime",
"darwinia-ecdsa-authority/try-runtime",
"darwinia-message-gadget/try-runtime",
"darwinia-message-transact/try-runtime",
"darwinia-staking/try-runtime",

# darwinia-messages-substrate
"pallet-bridge-dispatch/try-runtime",
"pallet-bridge-grandpa/try-runtime",
"pallet-bridge-messages/try-runtime",
"pallet-bridge-parachains/try-runtime",
"pallet-fee-market/try-runtime",

# frontier
"pallet-ethereum/try-runtime",
"pallet-evm/try-runtime",
Expand Down
14 changes: 14 additions & 0 deletions runtime/pangolin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,20 @@ try-runtime = [
"cumulus-pallet-xcmp-queue/try-runtime",
"parachain-info/try-runtime",

# darwinia
"darwinia-account-migration/try-runtime",
"darwinia-deposit/try-runtime",
"darwinia-ecdsa-authority/try-runtime",
"darwinia-message-gadget/try-runtime",
"darwinia-message-transact/try-runtime",
"darwinia-staking/try-runtime",

# darwinia-messages-substrate
"pallet-bridge-dispatch/try-runtime",
"pallet-bridge-grandpa/try-runtime",
"pallet-bridge-messages/try-runtime",
"pallet-fee-market/try-runtime",

# frontier
"pallet-ethereum/try-runtime",
"pallet-evm/try-runtime",
Expand Down

0 comments on commit 668fde3

Please sign in to comment.