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!: Merge GetVerifiedRange and GetRangeByHeight in Getter interface and remove redundant endpoint #117

Merged
merged 6 commits into from
Oct 12, 2023

Conversation

renaynay
Copy link
Member

Merges GetVerifiedRange functionality into GetRangeByHeight (breaks GetRangeByHeight signature and removes GetVerifiedRange)

No need for two methods doing the same thing.

Also introduces GetRange on store.Store interface to allow requesting local headers without passing in a fromHead for verification - this prevents p2p server from needing to perform an additional read (to get the fromHead) from the store to perform the GetRangeByHeight request.

@codecov-commenter
Copy link

Codecov Report

Merging #117 (8eb3f56) into main (30117cf) will increase coverage by 0.14%.
The diff coverage is 91.42%.

@@            Coverage Diff             @@
##             main     #117      +/-   ##
==========================================
+ Coverage   69.57%   69.71%   +0.14%     
==========================================
  Files          37       37              
  Lines        2938     2929       -9     
==========================================
- Hits         2044     2042       -2     
+ Misses        746      741       -5     
+ Partials      148      146       -2     
Files Coverage Δ
headertest/store.go 87.09% <100.00%> (-4.14%) ⬇️
interface.go 0.00% <ø> (ø)
local/exchange.go 62.50% <100.00%> (+14.88%) ⬆️
p2p/exchange.go 87.83% <100.00%> (+1.94%) ⬆️
p2p/server.go 80.00% <100.00%> (-2.23%) ⬇️
p2p/session.go 89.69% <100.00%> (ø)
sync/sync.go 73.29% <100.00%> (+0.15%) ⬆️
store/store.go 71.86% <80.00%> (+1.21%) ⬆️

p2p/server.go Show resolved Hide resolved
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the additional coverage!

@renaynay renaynay merged commit 26daa91 into celestiaorg:main Oct 12, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants