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

sync -- nits and cleanup #1674

Merged
merged 5 commits into from
Jun 30, 2023
Merged

sync -- nits and cleanup #1674

merged 5 commits into from
Jun 30, 2023

Conversation

danlaine
Copy link

@danlaine danlaine commented Jun 30, 2023

Why this should be merged

A little cleanup.

How this works

Move a few functions, rename a few things, convert a bunch of ifs into a switch

How this was tested

Existing UT

@danlaine danlaine added cleanup Code quality improvement merkledb labels Jun 30, 2023
@danlaine danlaine self-assigned this Jun 30, 2023
@@ -133,19 +132,6 @@ func (s *NetworkServer) AppRequest(
return nil
}

// isTimeout returns true if err is a timeout from a context cancellation
// or a context cancellation over grpc.
func isTimeout(err error) bool {
Copy link
Author

Choose a reason for hiding this comment

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

moved to bottom of file

@@ -494,30 +493,6 @@ func (m *Manager) findNextKey(
return nextKey, nil
}

// findChildDifference returns the first child index that is different between node 1 and node 2 if one exists and
// a bool indicating if any difference was found
func findChildDifference(node1, node2 *merkledb.ProofNode, startIndex byte) (byte, bool) {
Copy link
Author

Choose a reason for hiding this comment

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

moved to bottom of file

@danlaine danlaine marked this pull request as ready for review June 30, 2023 15:19
@danlaine danlaine merged commit 650dcba into dev Jun 30, 2023
@danlaine danlaine deleted the sync-cleanup branch June 30, 2023 17:46
ramilexe pushed a commit to ConsiderItDone/avalanchego that referenced this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement merkledb
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants