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

Statemanager fixes #3340

Merged
merged 4 commits into from
Mar 19, 2024
Merged

Statemanager fixes #3340

merged 4 commits into from
Mar 19, 2024

Conversation

Juliusan
Copy link
Contributor

Some minor fixes to State manager:

  • Pipes are closed once state manager is no longer needed
  • Block.Equals method used instead of custom implementation in State manager tests
  • State.Equals method moved to state packager from state manager; it might be doing too much, but that is what I used in state manager tests.

@Juliusan Juliusan requested a review from jorgemmsilva March 19, 2024 08:01
@Juliusan Juliusan merged commit 4f77282 into iotaledger:develop Mar 19, 2024
5 checks passed
}

func getCommonState(state1, state2 State) map[kv.Key]*commonEntry {
result := make(map[kv.Key]*commonEntry)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I understand correctly the size of this map will be O(#keys in the state). Is this intended to run in production? It might take a lot of RAM...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was running in tests only. But Equals method should be able to run in production too. I suppose, it would be enough to test the equality of TrieRoot in Equals. Will change that in another PR.

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.

3 participants