Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/orchestrator/src/generators/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,13 @@ fn clear_authorities(
val["staking"]["validatorCount"] = json!(0);
}
}

// clear assets-related genesis data to avoid orphaned asset accounts
if val.get("assets").is_some() {
val["assets"]["assets"] = json!([]);
val["assets"]["metadata"] = json!([]);
val["assets"]["accounts"] = json!([]);
}
} else {
unreachable!("pointer to runtime config should be valid!")
}
Expand Down
28 changes: 15 additions & 13 deletions crates/orchestrator/src/network_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,19 +249,21 @@ impl NetworkSpec {
try_join_all(
image_command_to_nodes_mapping
.keys()
.cloned()
.map(|(image, command)| async {
// get node available args output from image/command
let available_args = ns
.get_node_available_args((command.clone(), image.clone()))
.await?;
debug!(
"retrieved available args for image: {:?}, command: {}",
image, command
);

// map the result to include image and command
Ok::<_, OrchestratorError>((image, command, available_args))
.map(|(image, command)| {
let ns_cloned = ns.clone();
async move {
// get node available args output from image/command
let available_args = ns_cloned
.get_node_available_args((command.clone(), image.clone()))
.await?;
debug!(
"retrieved available args for image: {:?}, command: {}",
image, command
);

// map the result to include image and command
Ok::<_, OrchestratorError>((image.clone(), command.clone(), available_args))
}
})
.collect::<Vec<_>>(),
)
Expand Down
Loading