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

Remove unwrap() in runtime_lock #2764

Merged
merged 2 commits into from
Sep 20, 2022
Merged

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented 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.

Copy link
Contributor

@mergify mergify bot left a comment

Choose a reason for hiding this comment

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

Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2022

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
       -3080 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hac87440ab79ef7d4
       +2888 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb3e7964db2b95cad
       -2080 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hf0e90e5817cd3f6e
       +2077 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h3090b5de4c9a37b8
       -1974 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h5bdbacb47358f6c7
       +1971 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::ha0c3c33b94551c29
       +1931 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h624652bb5b9d09a5
       -1880 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb13ef27649875008
       +1877 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h30283ab1af011596
       -1857 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1f678157b87abe73
       +1854 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h5b25c15184222fb6
       -1818 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h50dda0251818fb85
       +1730 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h366ef2cb2bba7d14
       +1662 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hf8cff5d6896c7c05
       -1621 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::heb783535d9e301e4
       -1620 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hce711f939c917192
       -1585 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h6e7cd42d56f33ab5
       +1585 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb3313826ea04fb1c
       -1374 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h51e24dfa073db2eb
       +1374 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hd3cff856f3a4c049
        +580 ┊ ... and 176 more.
       +1374 ┊ Σ [196 Total Rows]

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

👍

@tomaka tomaka added the automerge Automatically merge pull request as soon as possible label Sep 20, 2022
@mergify mergify bot merged commit 58c56ed into paritytech:main Sep 20, 2022
@tomaka tomaka deleted the fix-panic-fetch branch September 20, 2022 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge pull request as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panicked at 'called Result::unwrap()
2 participants