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

Send new height with postBlock response #4482

Merged
merged 7 commits into from
Sep 8, 2021

Conversation

rainydio
Copy link
Contributor

@rainydio rainydio commented Sep 7, 2021

Summary

Send new height with postBlock response. It's used to update /api/peers endpoint. Fixes #4448

Checklist

  • Tests
  • Ready to be merged

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2021

Codecov Report

Merging #4482 (9553167) into develop (0b17013) will decrease coverage by 0.00%.
The diff coverage is 17.39%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4482      +/-   ##
===========================================
- Coverage    95.87%   95.86%   -0.01%     
===========================================
  Files          744      744              
  Lines        18494    18493       -1     
  Branches      2250     2248       -2     
===========================================
- Hits         17731    17729       -2     
- Misses         561      562       +1     
  Partials       202      202              
Flag Coverage Δ
functional 5.69% <0.00%> (+<0.01%) ⬆️
integration 9.46% <0.00%> (+<0.01%) ⬆️
unit 94.47% <17.39%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core-p2p/src/schemas.ts 100.00% <ø> (ø)
...ckages/core-p2p/src/socket-server/codecs/blocks.ts 13.33% <0.00%> (ø)
packages/core-p2p/src/peer-communicator.ts 95.89% <33.33%> (-1.39%) ⬇️
...s/core-p2p/src/socket-server/controllers/blocks.ts 93.02% <100.00%> (ø)
packages/core-p2p/src/network-monitor.ts 98.14% <0.00%> (+0.37%) ⬆️

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 0b17013...9553167. Read the comment docs.

@rainydio rainydio marked this pull request as ready for review September 8, 2021 00:56
@alessiodf
Copy link
Contributor

Hi,

Will the reply schema also need to be updated so it accepts objects of type { status: boolean, height: number } rather than just a boolean as is the case currently?

"p2p.blocks.postBlock": {
type: "boolean",
},

@sebastijankuzner sebastijankuzner merged commit 57ff2ee into develop Sep 8, 2021
@sebastijankuzner sebastijankuzner deleted the fix/core-p2p/add-height-header-response branch September 8, 2021 08:05
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.

4 participants