celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

service/state: Only request balance if node is synced

Open renaynay opened this issue 2 years ago • 1 comments

Since balance retrieval will now rely on the node's chain rather than just proxying the request through to the core node, /balance requests will only return successfully if the node is synced to network head.

Based on #911.

TODO:

  • [ ] some sort of mechanism to block until sync service properly starts (recognises the new network head)
  • [ ] blocked by #978

renaynay avatar Jul 22 '22 17:07 renaynay

Codecov Report

Merging #933 (7d6cea2) into main (718f364) will increase coverage by 0.15%. The diff coverage is 27.27%.

@@            Coverage Diff             @@
##             main     #933      +/-   ##
==========================================
+ Coverage   58.26%   58.41%   +0.15%     
==========================================
  Files         129      129              
  Lines        7727     7736       +9     
==========================================
+ Hits         4502     4519      +17     
+ Misses       2754     2745       -9     
- Partials      471      472       +1     
Impacted Files Coverage Δ
header/sync/sync.go 64.85% <0.00%> (-0.65%) :arrow_down:
service/state/service.go 40.00% <25.00%> (-7.83%) :arrow_down:
node/state/state.go 100.00% <100.00%> (ø)
fraud/pb/proof.pb.go 33.51% <0.00%> (+4.28%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us.

codecov-commenter avatar Jul 27 '22 14:07 codecov-commenter