Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Rename generate_solution_type! such that it shows exactly the types #8444

@kianenigma

Description

@kianenigma

This is an example of a solution type generation:

sp_npos_elections::generate_solution_type!(
	#[compact]
	pub struct NposSolution16::<u32, u16, sp_runtime::PerU16>(16)
	// -------------------- ^^ <NominatorIndex, ValidatorIndex, Accuracy>
);

The fact that I have to document it, and double check it is exactly showing the issue here. the syntax of the macro should be such that it clearly shows these. After all, the entire :: and <_> is fake and I am manually parsing it. Maybe something like

sp_npos_elections::generate_solution_type!(
	#[compact]
	pub struct NposSolution16::<Voter = u32, Target = u16, Accuracy = sp_runtime::PerU16>(16)
);

Metadata

Metadata

Assignees

Labels

I7-refactorCode needs refactoring.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coderZ6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions