Skip to content

refactor final score map struct in pse module#24

Merged
miladz68 merged 3 commits into
masterfrom
milad/refactor-final-score-map
Nov 14, 2025
Merged

refactor final score map struct in pse module#24
miladz68 merged 3 commits into
masterfrom
milad/refactor-final-score-map

Conversation

@miladz68

@miladz68 miladz68 commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Description

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

@miladz68 miladz68 requested a review from a team as a code owner November 14, 2025 07:31
@miladz68 miladz68 requested review from TxCorpi0x, masihyeganeh and ysv and removed request for a team November 14, 2025 07:31

@TxCorpi0x TxCorpi0x left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@TxCorpi0x reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @ysv)


x/pse/keeper/final_score_map.go line 42 at r1 (raw file):

	key, err := m.addressCodec.BytesToString(addr)
	if err != nil {
		return

Are we should that BytesToString is always no-error in our case? if yes, i think it would be beneficial to have a wrapper without returned type for address conversion. like MustAccAddressFromBech32 in the prior design.

@ysv ysv requested a review from TxCorpi0x November 14, 2025 11:23

@ysv ysv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ysv reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @TxCorpi0x)


x/pse/keeper/final_score_map.go line 42 at r1 (raw file):

Previously, TxCorpi0x wrote…

Are we should that BytesToString is always no-error in our case? if yes, i think it would be beneficial to have a wrapper without returned type for address conversion. like MustAccAddressFromBech32 in the prior design.

yes
I tend to agree that it doesn't look correct to just return if err is present here

@ysv ysv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @TxCorpi0x)


x/pse/keeper/final_score_map.go line 42 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

yes
I tend to agree that it doesn't look correct to just return if err is present here

blocking

@miladz68 miladz68 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @TxCorpi0x, and @ysv)


x/pse/keeper/final_score_map.go line 42 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

blocking

so we should panic instead of returning an error ?

@TxCorpi0x TxCorpi0x left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:lgtm:

@TxCorpi0x reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @ysv)

@ysv ysv requested a review from TxCorpi0x November 14, 2025 12:58

@ysv ysv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ysv reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @TxCorpi0x)

@miladz68 miladz68 merged commit ca7ecae into master Nov 14, 2025
8 of 9 checks passed
@miladz68 miladz68 deleted the milad/refactor-final-score-map branch November 14, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants