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

refactor(core-p2p): throw response errors instead of returning a success boolean #2402

Merged
merged 30 commits into from Apr 12, 2019

Conversation

Projects
None yet
4 participants
@faustbrian
Copy link
Collaborator

faustbrian commented Apr 11, 2019

Proposed changes

Either respond or throw an error instead of relying on { success: true/false } which is a relic from ark-node.

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 air1one as a code owner Apr 11, 2019

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

ArkEcosystemBot commented Apr 11, 2019

The ci/circleci: test-node11-integration-1 job is failing as of eb0a9c13a9d23fce4b3fa0f2647c8bae88e58579. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Apr 11, 2019

Codecov Report

Merging #2402 into 2.4 will increase coverage by 0.14%.
The diff coverage is 80.64%.

Impacted file tree graph

@@            Coverage Diff            @@
##              2.4   #2402      +/-   ##
=========================================
+ Coverage   68.16%   68.3%   +0.14%     
=========================================
  Files         401     402       +1     
  Lines        8610    8662      +52     
  Branches      380     385       +5     
=========================================
+ Hits         5869    5917      +48     
  Misses       2702    2702              
- Partials       39      43       +4
Impacted Files Coverage Δ
packages/core-utils/src/is-block-chained.ts 100% <ø> (ø)
packages/core-p2p/src/utils/is-valid-peer.ts 88.88% <0%> (-5.23%) ⬇️
...kages/core-p2p/src/socket-server/utils/validate.ts 100% <100%> (ø) ⬆️
packages/core-forger/src/client.ts 69.38% <100%> (ø) ⬆️
packages/core-blockchain/src/blockchain.ts 52.98% <100%> (+0.35%) ⬆️
packages/core-p2p/src/peer-connector.ts 95.45% <100%> (+0.21%) ⬆️
...s/core-blockchain/src/processor/block-processor.ts 100% <100%> (ø) ⬆️
packages/core-p2p/src/peer-verifier.ts 82.05% <100%> (ø) ⬆️
packages/core-blockchain/src/state-machine.ts 88.98% <100%> (-0.1%) ⬇️
...es/core-p2p/src/socket-server/versions/internal.ts 100% <100%> (ø) ⬆️
... and 9 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 c7c7ce4...576f8ca. Read the comment docs.

faustbrian and others added some commits Apr 11, 2019

@faustbrian faustbrian changed the title refactor(core-p2p): throw errors instead of returning success true/false refactor(core-p2p): throw response errors instead of returning a success boolean Apr 11, 2019

@faustbrian faustbrian merged commit ce56537 into 2.4 Apr 12, 2019

8 checks passed

ci/circleci: test-node10-functional Your tests passed on CircleCI!
Details
ci/circleci: test-node10-integration-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-integration-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-unit Your tests passed on CircleCI!
Details
ci/circleci: test-node11-functional Your tests passed on CircleCI!
Details
ci/circleci: test-node11-integration-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-integration-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-unit Your tests passed on CircleCI!
Details

@ArkEcosystemBot ArkEcosystemBot deleted the refactor/sc-peer-handlers branch Apr 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.