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

Provide KV type in the interop/storage package #3607

Open
roman-khimov opened this issue Oct 11, 2024 · 0 comments
Open

Provide KV type in the interop/storage package #3607

roman-khimov opened this issue Oct 11, 2024 · 0 comments
Labels
enhancement Improving existing functionality I3 Minimal impact S3 Minimally significant U4 Nothing urgent

Comments

@roman-khimov
Copy link
Member

Is your feature request related to a problem? Please describe.

I'm always frustrated when I see this:

	newNodes := storage.Find(ctx, newNodesPrefix, storage.None)
	for iterator.Next(newNodes) {
		newNode := iterator.Value(newNodes).(struct {
			key []byte
			val []byte
		})

Especially given the fact that this is not the first time I'm seeing it. We have similar code and types in other contracts dealing with updates or otherwise interacting with iterators returning KV pairs.

Describe the solution you'd like

Provide some type for KV pair.

Describe alternatives you've considered

Keep as is, explain and duplicate it again and again.

Additional context

nspcc-dev/neofs-contract#438

@roman-khimov roman-khimov added I3 Minimal impact U4 Nothing urgent enhancement Improving existing functionality S3 Minimally significant labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I3 Minimal impact S3 Minimally significant U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

1 participant