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

refactor(core-api): implement a cache service to DRY the server method logic #1930

Merged
merged 2 commits into from Jan 3, 2019

Conversation

Projects
None yet
2 participants
@faustbrian
Copy link
Collaborator

faustbrian commented Jan 3, 2019

Proposed changes

While looking into an issue in core-api I noticed that the server method cache could need some cleanup.

Types of changes

  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes

@faustbrian faustbrian requested a review from supaiku0 Jan 3, 2019

@wafflebot wafflebot bot added the review label Jan 3, 2019

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 3, 2019

Codecov Report

Merging #1930 into develop will increase coverage by 0.66%.
The diff coverage is 6.49%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1930      +/-   ##
===========================================
+ Coverage    39.83%   40.49%   +0.66%     
===========================================
  Files          327      350      +23     
  Lines         7476     7561      +85     
  Branches      1120     1135      +15     
===========================================
+ Hits          2978     3062      +84     
+ Misses        4485     4484       -1     
- Partials        13       15       +2
Impacted Files Coverage Δ
...kages/core-api/src/versions/2/shared/controller.ts 0% <ø> (ø) ⬆️
packages/core-api/src/services/transformer.ts 0% <ø> (ø) ⬆️
packages/core-p2p/src/peer.ts 19.1% <ø> (ø) ⬆️
...2p/src/server/versions/internal/handlers/rounds.ts 0% <ø> (ø) ⬆️
packages/core-transaction-pool/src/connection.ts 6.54% <ø> (ø) ⬆️
packages/core-p2p/src/monitor.ts 0% <ø> (ø) ⬆️
packages/core-vote-report/src/handler.ts 100% <ø> (ø) ⬆️
packages/core-api/src/versions/2/votes/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/1/transactions/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/2/transactions/methods.ts 0% <0%> (ø) ⬆️
... and 37 more

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 dfa3881...ef0ea1b. Read the comment docs.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 3, 2019

Codecov Report

Merging #1930 into develop will increase coverage by 0.65%.
The diff coverage is 6.41%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1930      +/-   ##
===========================================
+ Coverage    39.83%   40.49%   +0.65%     
===========================================
  Files          327      350      +23     
  Lines         7476     7562      +86     
  Branches      1120     1108      -12     
===========================================
+ Hits          2978     3062      +84     
  Misses        4485     4485              
- Partials        13       15       +2
Impacted Files Coverage Δ
...kages/core-api/src/versions/2/shared/controller.ts 0% <ø> (ø) ⬆️
packages/core-api/src/services/transformer.ts 0% <ø> (ø) ⬆️
packages/core-p2p/src/peer.ts 19.1% <ø> (ø) ⬆️
...2p/src/server/versions/internal/handlers/rounds.ts 0% <ø> (ø) ⬆️
packages/core-transaction-pool/src/connection.ts 6.54% <ø> (ø) ⬆️
packages/core-p2p/src/monitor.ts 0% <ø> (ø) ⬆️
packages/core-vote-report/src/handler.ts 100% <ø> (ø) ⬆️
packages/core-api/src/versions/2/votes/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/1/transactions/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/2/transactions/methods.ts 0% <0%> (ø) ⬆️
... and 37 more

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 dfa3881...ef0ea1b. Read the comment docs.

@faustbrian faustbrian merged commit 13bc930 into develop Jan 3, 2019

8 checks passed

ci/circleci: test-node10-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-2 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-slow Your tests passed on CircleCI!
Details
ci/circleci: test-node11-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-2 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-slow Your tests passed on CircleCI!
Details

@wafflebot wafflebot bot removed the review label Jan 3, 2019

@faustbrian faustbrian deleted the refactor/api-cache-service branch Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment