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

Invalid addrs crushes sc-iterator methods usages #66

Closed
NikitaZotov opened this issue Jun 16, 2022 · 0 comments · Fixed by #316
Closed

Invalid addrs crushes sc-iterator methods usages #66

NikitaZotov opened this issue Jun 16, 2022 · 0 comments · Fixed by #316
Assignees
Labels
bug Something isn't working

Comments

@NikitaZotov
Copy link
Member

Describe the bug
If sc-iterator was created with invalid not-exist addrs, then its methods is dangerous for usage, because they call errors.

To Reproduce
Steps to reproduce the behavior:

  1. Create non-valid sc-address, for example ScAddr const & addr = ScAddr(125);;
  2. Create 3-constr iterator `ScIterator3Ptr const iter3 = m_ctx.Iterator3(addr, ..., ...);
  3. Call Next and Get methods from it.

Expected behavior
Iterators must check themself. It can be solved by IsValid() calls at the begin of iterators methods.

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu 20.04]
  • Version [e.g. 0.6.1]
@NikitaZotov NikitaZotov added bug Something isn't working logic labels Jun 16, 2022
@NikitaZotov NikitaZotov removed the logic label Sep 15, 2022
NikitaZotov pushed a commit to NikitaZotov/sc-machine that referenced this issue Apr 4, 2023
@NikitaZotov NikitaZotov self-assigned this Nov 28, 2023
@NikitaZotov NikitaZotov linked a pull request Nov 28, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant