Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

feat: implement getConsensusParams method #393

Merged
merged 15 commits into from
Aug 17, 2021
Merged

Conversation

shuplenkov
Copy link
Member

@shuplenkov shuplenkov commented Aug 5, 2021

Issue being fixed or feature implemented

Need to implement getConsensusParams method to get current consensus params from tenderdash

What was done?

Implemented new getConsensusParams method

How Has This Been Tested?

With platform-test-suite

Breaking Changes

No

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shuplenkov shuplenkov requested a review from shumkov August 5, 2021 14:12
shumkov
shumkov previously approved these changes Aug 5, 2021
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

👍

@shuplenkov shuplenkov marked this pull request as ready for review August 11, 2021 10:07
Comment on lines 46 to 50
if (e instanceof RPCError) {
throw new InternalGrpcError(e);
}

throw e;
Copy link
Member

Choose a reason for hiding this comment

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

I guess it could respond with different errors, for example the height is not valid or something like that. In this case you nee to you other gRPC error codes.

Konstantin Shuplenkov added 3 commits August 11, 2021 17:45
# Conflicts:
#	.github/workflows/.env
#	package-lock.json
#	package.json
} catch (e) {
if (e instanceof RPCError) {
if (e.code === 32603) {
throw new InvalidHeightError(e.data, null, e.code);
Copy link
Member

Choose a reason for hiding this comment

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

Actually you need to throw gRPC error with gRPC error code. Precondition Failed is the best candidate.

@shuplenkov shuplenkov merged commit 954e6f1 into v0.21-dev Aug 17, 2021
@shuplenkov shuplenkov deleted the get-consensus-params branch August 17, 2021 06:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants