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

Add no error type #722

Merged
merged 3 commits into from
Feb 19, 2024
Merged

Add no error type #722

merged 3 commits into from
Feb 19, 2024

Conversation

cryptoAtwill
Copy link
Contributor

@cryptoAtwill cryptoAtwill commented Feb 19, 2024

Currently main is broken due to:

error[E0412]: cannot find type `XnetMessagingFacetErrors` in module `xnet_messaging_facet`
  --> fendermint/vm/interpreter/src/fvm/state/ipc.rs:55:31
   |
55 |         xnet_messaging_facet::XnetMessagingFacetErrors,
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `XnetMessagingFacet`
   |

because there are no errors defined in XnetMessagingFacet, use NoRevert instead.

@cryptoAtwill cryptoAtwill requested a review from aakoshh February 19, 2024 11:00
Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

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

If you look at the docstring of ContractCaller there already is a NoRevert type.


impl ContractRevert for NoErrors {
fn valid_selector(_selector: Selector) -> bool {
unreachable!("valid_selector should not have been called")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably going to crash the node if there is an error. NoRevert does it safer I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good, missed it

Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

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

👍

@cryptoAtwill cryptoAtwill merged commit c0ff059 into main Feb 19, 2024
16 checks passed
@cryptoAtwill cryptoAtwill deleted the fix-main branch February 19, 2024 12:10
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 this pull request may close these issues.

2 participants