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-p2p): include estimateTotalCount into peers response #3825

Merged
merged 7 commits into from
Jun 29, 2020

Conversation

sebastijankuzner
Copy link
Contributor

@sebastijankuzner sebastijankuzner commented Jun 23, 2020

Summary

This PR solves issue #3592.

P2P API includes estimateTotalCount boolean property based on the node configuration achieved via CORE_API_NO_ESTIMATED_TOTAL_COUNT flag.

Core-api peers endpoint now returns plugins with the estimateTotalCount property inside @arkecosystem/core-api plugin options.

Part of the response:

        {
            "ip": "192.168.64.8",
            "port": "4000",
            "ports": {},
            "version": "3.0.0-next.0",
            "height": 85288,
            "latency": 31,
            "plugins": {
                "@arkecosystem/core-api": {
                    "enabled": true,
                    "port": 4003,
                    "estimateTotalCount": false
                },
                "@arkecosystem/core-webhooks": {
                    "enabled": true,
                    "port": 4004
                }
            }
        }

Checklist

  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Jun 23, 2020

Codecov Report

Merging #3825 into develop will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3825      +/-   ##
===========================================
+ Coverage    91.87%   92.00%   +0.13%     
===========================================
  Files          620      620              
  Lines        14787    14798      +11     
  Branches      1853     1850       -3     
===========================================
+ Hits         13585    13615      +30     
+ Misses         938      937       -1     
+ Partials       264      246      -18     
Flag Coverage Δ
#functional 6.06% <0.00%> (-0.04%) ⬇️
#integration 9.58% <0.00%> (-0.01%) ⬇️
#unit 90.06% <100.00%> (+0.13%) ⬆️
Impacted Files Coverage Δ
packages/core-api/src/resources/peer.ts 100.00% <ø> (ø)
packages/core-p2p/src/schemas.ts 100.00% <ø> (ø)
...ore-p2p/src/socket-server/utils/get-peer-config.ts 87.09% <100.00%> (+7.78%) ⬆️
packages/core-p2p/src/peer-verifier.ts 99.42% <0.00%> (ø)
packages/core-webhooks/src/listener.ts 100.00% <0.00%> (ø)
packages/core-kernel/src/application.ts 100.00% <0.00%> (ø)
packages/core-p2p/src/utils/check-ntp.ts 100.00% <0.00%> (ø)
packages/core-state/src/state-builder.ts 100.00% <0.00%> (ø)
packages/core-p2p/src/socket-server/server.ts 100.00% <0.00%> (ø)
packages/core-transaction-pool/src/service.ts 99.19% <0.00%> (ø)
... and 18 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 e943e56...2c05aa9. Read the comment docs.

@faustbrian faustbrian changed the title feat(core-p2p, core-api): include estimateTotalCount into peers response feat(core-p2p): include estimateTotalCount into peers response Jun 23, 2020
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