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

Panic when synchronizing against a testnet with different radon operators #808

Closed
tmpolaczyk opened this issue Sep 9, 2019 · 4 comments
Closed

Comments

@tmpolaczyk
Copy link
Contributor

Given a recent change of Radon operator codes, blocks from testnet-4 should be marked as invalid by the current master branch. The exact cause is this unwrap from the witnet_rad crate:

subscript.push(unpack_radon_call(arg).unwrap())

But there are many more similar unwraps in that crate. Ideally we should replace all the unwraps with returning a result, and add tests so this does not happen again.

@aesedepece
Copy link
Member

Agreed, all those unwraps should be replaced with ? operator short-circuiting, or .try_fold() or .map().collect() if one wants to go functional.

@tmpolaczyk
Copy link
Contributor Author

The unwraps were removed, but the tests are still missing. We need to test all the branches of unpack_radon_script, unpack_radon_call, unpack_compound_call and unpack_subscript.

@aesedepece
Copy link
Member

Are we OK to close this?

@tmpolaczyk
Copy link
Contributor Author

Only if there are tests

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

No branches or pull requests

3 participants