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(service/state): CoreAccessor relies on header.Head instead of header.Getter #1088

Merged
merged 5 commits into from
Sep 19, 2022

Conversation

renaynay
Copy link
Member

CoreAccessor relies on the Syncer implementation of header.Head instead of the header.Store implementation of header.Getter in order to provide access to more current network head, and consequently, balance information.

@renaynay renaynay self-assigned this Sep 14, 2022
@renaynay renaynay added kind:improvement area:header Extended header area:state Related to fetching state and state execution labels Sep 14, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1088 (03686b7) into main (f83983c) will increase coverage by 0.01%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##             main    #1088      +/-   ##
==========================================
+ Coverage   56.82%   56.84%   +0.01%     
==========================================
  Files         136      136              
  Lines        9063     9064       +1     
==========================================
+ Hits         5150     5152       +2     
  Misses       3372     3372              
+ Partials      541      540       -1     
Impacted Files Coverage Δ
header/sync/sync_head.go 57.75% <0.00%> (-1.02%) ⬇️
service/state/core_access.go 11.59% <ø> (ø)
node/state/core.go 100.00% <100.00%> (ø)
node/state/state.go 100.00% <100.00%> (ø)
service/state/service.go 33.33% <100.00%> (-2.16%) ⬇️
header/core/listener.go 58.49% <0.00%> (+5.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@renaynay renaynay marked this pull request as ready for review September 14, 2022 11:36
distractedm1nd
distractedm1nd previously approved these changes Sep 14, 2022
walldiss
walldiss previously approved these changes Sep 14, 2022
Wondertan
Wondertan previously approved these changes Sep 14, 2022
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.

Awesome. Like this line:

Note that "chain head" is subjective to the component
reporting it.

@renaynay renaynay merged commit b37a844 into celestiaorg:main Sep 19, 2022
@renaynay renaynay deleted the state-rely-on-sync-head branch September 19, 2022 11:03
distractedm1nd pushed a commit to distractedm1nd/celestia-node that referenced this pull request Sep 21, 2022
…ad of `header.Getter` (celestiaorg#1088)

* refactor(service/state): Remove unused header.Getter from state service and lint core_access.go imports

* refactor(header): Extract Head method from Getter into its own interface `Head`

* feat(header/sync): Syncer implements header.Head

* doc(header/sync): document Head method better

* refactor(service/state): CoreAccessor takes header.Head instead of header.Getter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:header Extended header area:state Related to fetching state and state execution
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants