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

Staking V4: auction list api endpoint #4068

Merged
merged 15 commits into from Jun 16, 2022

Conversation

bogdan-rosianu
Copy link
Contributor

implemented the first version of the auction list API endpoint

@bogdan-rosianu bogdan-rosianu added the type:feature New feature or request label May 10, 2022
@bogdan-rosianu bogdan-rosianu self-assigned this May 10, 2022
@mariusmihaic mariusmihaic self-requested a review May 12, 2022 10:13
Copy link
Contributor

@mariusmihaic mariusmihaic left a comment

Choose a reason for hiding this comment

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

GJ by deleting duplicated mocks

api/groups/validatorGroup_test.go Outdated Show resolved Hide resolved
api/groups/validatorGroup_test.go Outdated Show resolved Hide resolved
api/groups/validatorGroup_test.go Outdated Show resolved Hide resolved
api/groups/validatorGroup_test.go Outdated Show resolved Hide resolved
api/mock/facadeStub.go Outdated Show resolved Hide resolved
epochStart/metachain/systemSCs.go Outdated Show resolved Hide resolved
epochStart/metachain/systemSCs.go Outdated Show resolved Hide resolved
facade/mock/nodeStub.go Outdated Show resolved Hide resolved
factory/disabled/stakingDataProvider.go Outdated Show resolved Hide resolved
gabi-vuls
gabi-vuls previously approved these changes May 12, 2022
Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

System test passed.
@@ Log scanner @@

auction-list-api-endpoint

================================================================================

  • Known Warnings 10
  • New Warnings 2
  • Known Errors 0
  • New Errors 0
  • Panics 0
    ================================================================================

mariusmihaic
mariusmihaic previously approved these changes May 12, 2022
@@ -864,6 +864,10 @@ func (n *Node) ValidatorStatisticsApi() (map[string]*state.ValidatorApiResponse,
return n.processComponents.ValidatorsProvider().GetLatestValidators(), nil
}

func (n *Node) AuctionListApi() ([]*common.AuctionListValidatorAPIResponse, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing comment
Why do we need to return an error here?

continue
}

pubKeyBytes, err := vp.validatorPubKeyConverter.Decode(pubKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

could have extracted L120 - L138 in a function that could have returned error and do the error handling once.
Could have better tested the internal function on all cases

# Conflicts:
#	epochStart/metachain/systemSCs_test.go
#	factory/blockProcessorCreator.go
@mariusmihaic mariusmihaic changed the base branch from feat/liquid-staking to EN-12197-staking-v4-integration-tests-unJail June 7, 2022 12:57
…ion-list-api-endpoint

# Conflicts:
#	epochStart/metachain/auctionListSelector_test.go
#	epochStart/metachain/systemSCs_test.go
#	testscommon/stakingcommon/stakingDataProviderStub.go
Base automatically changed from EN-12197-staking-v4-integration-tests-unJail to feat/liquid-staking June 16, 2022 11:26
@mariusmihaic mariusmihaic merged commit ac70458 into feat/liquid-staking Jun 16, 2022
@mariusmihaic mariusmihaic deleted the auction-list-api-endpoint branch June 16, 2022 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants