Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

merkledb -- move and rename methods #1919

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Conversation

danlaine
Copy link

Why this should be merged

  1. If an exported function is a call-through to an unexported function, it should be defined next to it.
  2. The relationship between Put and PutContext is more clear than Put and Insert. This is analogous to the net.Dialer methods Dial and DialContext.

How this works

Self-explanatory

How this was tested

N/A

@danlaine danlaine added cleanup Code quality improvement merkledb labels Aug 24, 2023
@danlaine danlaine self-assigned this Aug 24, 2023
@@ -723,26 +717,6 @@ func (db *merkleDB) HealthCheck(ctx context.Context) (interface{}, error) {
return db.nodeDB.HealthCheck(ctx)
}

func (db *merkleDB) Insert(ctx context.Context, k, v []byte) error {
Copy link
Author

Choose a reason for hiding this comment

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

Renamed PutContext and moved below

@danlaine danlaine merged commit 6745bbd into dev Aug 24, 2023
@danlaine danlaine deleted the merkledb-move-and-rename-methods branch August 24, 2023 17:01
@danlaine danlaine added this to the v1.10.10 milestone Sep 7, 2023
# for free to join this conversation on GitHub. Already have an account? # 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