Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update smoldot, improve chainspec loading error message #1581

Closed
wants to merge 3 commits into from

Conversation

skunert
Copy link
Contributor

@skunert skunert commented Sep 15, 2023

  • Update smoldot dependencies.
  • Add better error message for invalid chainspecs on polkadot-parachain.

@skunert skunert added T0-node This PR/Issue is related to the topic “node”. T9-cumulus This PR/Issue is related to cumulus. labels Sep 15, 2023
@skunert skunert requested a review from a team September 15, 2023 08:10
@michalkucharczyk michalkucharczyk requested a review from a team September 15, 2023 08:41
@skunert
Copy link
Contributor Author

skunert commented Sep 19, 2023

This job seems more flaky than before: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3740251, I will hold off merging for now.

#[derive(Debug, serde::Deserialize)]
struct EmptyChainSpecWithId {
id: String,
}

let file = std::fs::File::open(self).expect("Failed to open file");
let file = std::fs::File::open(self)?;

let reader = std::io::BufReader::new(file);
let chain_spec: EmptyChainSpecWithId = serde_json::from_reader(reader)
.expect("Failed to read 'json' file with ChainSpec configuration");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this failure also could be returned with '?'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”. T9-cumulus This PR/Issue is related to cumulus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants