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

fix(core-p2p): return an empty array if the peers cache parsing fails #2061

Merged
merged 1 commit into from Feb 4, 2019

Conversation

Projects
None yet
4 participants
@faustbrian
Copy link
Collaborator

faustbrian commented Feb 4, 2019

Proposed changes

If the ~/.cache/ark-core/devnet/peers.json file is malformed the JSON.parse will fail as only Joi errors are currently handled.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Checklist

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

This comment has been minimized.

Copy link
Member

ArkEcosystemBot commented Feb 4, 2019

@supaiku0 @air1one - please review this in the next few days. Be sure to explicitly select labels so I know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Feb 4, 2019

Codecov Report

Merging #2061 into develop will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2061      +/-   ##
===========================================
- Coverage    73.76%   73.76%   -0.01%     
===========================================
  Files          367      367              
  Lines         8257     8259       +2     
  Branches      1208     1208              
===========================================
+ Hits          6091     6092       +1     
- Misses        2132     2133       +1     
  Partials        34       34
Impacted Files Coverage Δ
packages/core-p2p/src/utils/restore-peers.ts 88.88% <100%> (-4.87%) ⬇️

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 0dd9062...9965a83. Read the comment docs.

@supaiku0 supaiku0 merged commit ccf3647 into develop Feb 4, 2019

6 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-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

@ArkEcosystemBot ArkEcosystemBot deleted the fix/peer-cache branch Feb 4, 2019

vasild added a commit that referenced this pull request Feb 4, 2019

Merge remote-tracking branch 'ArkEcosystem/core/develop' into verify-…
…peer-state

* ArkEcosystem/core/develop:
  fix(core-p2p): return an empty array if the peers cache parsing fails (#2061)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment