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

Redundant Header.GetIndex() method #3798

Open
AliceInHunterland opened this issue Jan 30, 2025 · 1 comment
Open

Redundant Header.GetIndex() method #3798

AliceInHunterland opened this issue Jan 30, 2025 · 1 comment
Labels
blocked Can't be done because of something enhancement Improving existing functionality go Go language related I4 No visible changes S4 Routine U4 Nothing urgent

Comments

@AliceInHunterland
Copy link
Contributor

AliceInHunterland commented Jan 30, 2025

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

It is preferable to avoid that, but generics in Go don't support structural types for now, ref. golang/go#51259.

// GetIndex returns the index of the block.
func (b *Header) GetIndex() uint32 {
	return b.Index
}

Describe the solution you'd like

So one day redundant code should be removed.

Describe alternatives you've considered

Additional context

#3789 (comment)

@AliceInHunterland AliceInHunterland added enhancement Improving existing functionality I4 No visible changes S4 Routine U4 Nothing urgent labels Jan 30, 2025
@AnnaShaleva
Copy link
Member

Attach the link to the original conversation.

@AnnaShaleva AnnaShaleva added go Go language related blocked Can't be done because of something labels Jan 30, 2025
@AnnaShaleva AnnaShaleva changed the title Redundant GetIndex() for blocks and indexes Redundant Header.GetIndex() method Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Can't be done because of something enhancement Improving existing functionality go Go language related I4 No visible changes S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

2 participants