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

Panicked at 'called Result::unwrap() #2763

Closed
tuul-wq opened this issue Sep 20, 2022 · 1 comment · Fixed by #2764
Closed

Panicked at 'called Result::unwrap() #2763

tuul-wq opened this issue Sep 20, 2022 · 1 comment · Fixed by #2764

Comments

@tuul-wq
Copy link

tuul-wq commented Sep 20, 2022

Got the following error while connected to Polkadot using lates version of @polkadot/rpc-provider": "9.4.1 / "@substrate/smoldot-light": "0.6.33"

Smoldot has panicked while executing task "json-rpc-polkadot"
Panicked at 'called Result::unwrap() on an Err value: ()', /__w/smoldot/smoldot/bin/light-base/src/json_rpc_service.rs:1346:61

@tomaka
Copy link
Contributor

tomaka commented Sep 20, 2022

self.state_trie_root_hash(block_hash).await.unwrap(); // TODO: don't unwrap

@mergify mergify bot closed this as completed in #2764 Sep 20, 2022
mergify bot pushed a commit that referenced this issue Sep 20, 2022
Fix #2763

This PR gives a proper error type to the `state_trie_root_hash` function
(which retrieves the state trie root hash of a block from the network),
and makes `runtime_lock` properly propagates the error instead of
unwrapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants