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

feat(core-api): allow easy retrieval of first and last block #2641

Merged
merged 1 commit into from
May 31, 2019

Conversation

faustbrian
Copy link
Contributor

@faustbrian faustbrian commented May 31, 2019

Often times you just want the last forged block or the genesis block to check something. This adds 2 endpoints to the block resource that retrieves those from in-memory instead of hitting the database.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

@codecov-io
Copy link

Codecov Report

Merging #2641 into 2.5 will increase coverage by 0.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.5    #2641      +/-   ##
==========================================
+ Coverage   64.74%   64.76%   +0.01%     
==========================================
  Files         367      367              
  Lines        8220     8230      +10     
  Branches      378      378              
==========================================
+ Hits         5322     5330       +8     
- Misses       2861     2863       +2     
  Partials       37       37
Impacted Files Coverage Δ
...ckages/core-api/src/handlers/blocks/transformer.ts 100% <100%> (ø) ⬆️
packages/core-api/src/handlers/blocks/routes.ts 100% <100%> (ø) ⬆️
packages/core-api/src/handlers/blocks/schema.ts 100% <100%> (ø) ⬆️
...ackages/core-api/src/handlers/blocks/controller.ts 71.42% <66.66%> (-1.91%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21df0d8...c85fd8b. Read the comment docs.

@faustbrian faustbrian marked this pull request as ready for review May 31, 2019 06:47
@faustbrian faustbrian merged commit 9b06161 into 2.5 May 31, 2019
@ghost ghost deleted the feat/first-last branch May 31, 2019 06:48
@ghost ghost removed the Status: In Progress label May 31, 2019
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.

None yet

2 participants