Skip to content

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

Merged
spkjp merged 1 commit intodevelopfrom
fix/peer-cache
Feb 4, 2019
Merged

fix(core-p2p): return an empty array if the peers cache parsing fails#2061
spkjp merged 1 commit intodevelopfrom
fix/peer-cache

Conversation

@faustbrian
Copy link
Copy Markdown
Contributor

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

@ghost
Copy link
Copy Markdown

ghost 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.

@spkjp spkjp self-requested a review February 4, 2019 13:41
@codecov-io
Copy link
Copy Markdown

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.

@spkjp spkjp merged commit ccf3647 into develop Feb 4, 2019
@ghost ghost deleted the fix/peer-cache branch February 4, 2019 13:43
@ghost ghost removed the Status: Needs Review label Feb 4, 2019
vasild added a commit that referenced this pull request Feb 4, 2019
…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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants