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

Adding GetCalcTiming function to grpc service #1872

Merged
merged 1 commit into from
May 18, 2020

Conversation

Krakaw
Copy link
Contributor

@Krakaw Krakaw commented May 15, 2020

Description

Added in the GetCalcTiming grpc endpoint. Part of doing that was decoupling some of the functionality from the Parser these were only small changes, as there is further work required there to fully de-couple the cli from the base node. The height lists and header responses were moved into the BlockHeader, there could be a better place for them, but it made sense in context.

Motivation and Context

Getting more of the functionality ported to the GRPC interface is going to help with the block explorer requirements. This was some low hanging fruit to get started with.

How Has This Been Tested?

cargo test
No new tests have been written for the grpc endpoints yet.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch.
  • I ran cargo-fmt --all before pushing.
  • I have squashed my commits into a single commit.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Moving header helper functions from cli

The header height collection was tightly coupled to the parser,
moving these to the BlockHeader seemed like the logical place for
them these functions to live.

They have been reused in the grpc service, these changes are the
beginning of decoupling some of the functionality from the parser.

Adding function comment

Adding better logging and parameter comments

Adding request argument validation

fmt
Copy link
Contributor

@philipr-za philipr-za left a comment

Choose a reason for hiding this comment

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

LGTM

@sdbondi sdbondi merged commit 96d2e2c into tari-project:development May 18, 2020
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