+
Skip to content

IDEN-298 add subject position to claim #425

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

Merged
merged 5 commits into from
May 12, 2022

Conversation

ilya-korotya
Copy link
Contributor

No description provided.

claim.go Outdated
@@ -324,6 +335,18 @@ func (c *Claim) GetSchemaHash() SchemaHash {
return schemaHash
}

// GetSubjectPosition return a position where the subject is stored.
func (c *Claim) GetSubjectPosition() (SubjectPosition, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need SubjectPosition type if we already have Subject?
I would propose just rename getSubject to GetSubject and that's it. Subject already a public type and all values of it are public too. I think we do not need another type. Return one of Subject constants would be fine.

claim.go Outdated
case SubjectOtherIdenValue:
return SubjectPositionValue, nil
default:
return "", errors.New("claim without ")
Copy link
Contributor

Choose a reason for hiding this comment

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

If you won't agree with my previous comment, then it looks like this error needs more text.

olomix
olomix previously approved these changes May 11, 2022
claim.go Outdated
subjectSelfFlag subjectFlag = iota // 000
subjectInvalidFlag // 001
subjectOtherIdenIndexFlag // 010
subjectOtherIdenValueFlag // 011
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rename these constants like subjectFlagOtherIdenValue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@vmidyllic vmidyllic merged commit 309f7cd into master May 12, 2022
@ilya-korotya ilya-korotya deleted the feature/IDEN-298-add-subject-position-to-claim branch May 22, 2023 10:05
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.

4 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载