Skip to content

fix(core-api): ensure safe integer range for block height lookups#1673

Merged
faustbrian merged 3 commits intodevelopfrom
apipatch
Dec 7, 2018
Merged

fix(core-api): ensure safe integer range for block height lookups#1673
faustbrian merged 3 commits intodevelopfrom
apipatch

Conversation

@faustbrian
Copy link
Copy Markdown
Contributor

Proposed changes

We store heights as integers in postgresql which can cause issues when block IDs are tried as heights as the max allowed size is 2147483647.

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

@faustbrian faustbrian requested a review from spkjp December 7, 2018 16:36
@ghost ghost assigned faustbrian Dec 7, 2018
@ghost ghost added the review label Dec 7, 2018
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 7, 2018

Codecov Report

Merging #1673 into develop will increase coverage by 0.12%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1673      +/-   ##
===========================================
+ Coverage    74.96%   75.09%   +0.12%     
===========================================
  Files          444      444              
  Lines         7961     7962       +1     
  Branches      1048     1048              
===========================================
+ Hits          5968     5979      +11     
+ Misses        1770     1763       -7     
+ Partials       223      220       -3
Impacted Files Coverage Δ
packages/core-api/lib/repositories/blocks.js 88.37% <66.66%> (+0.27%) ⬆️
...p2p/lib/server/versions/internal/handlers/utils.js 86.66% <0%> (+6.66%) ⬆️
packages/core-forger/lib/manager.js 80.58% <0%> (+8.73%) ⬆️

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 c630385...30ee6a4. Read the comment docs.

@faustbrian faustbrian merged commit 97c2572 into develop Dec 7, 2018
@ghost ghost removed the review label Dec 7, 2018
@faustbrian faustbrian deleted the apipatch branch December 7, 2018 16:43
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