celestia-node
celestia-node copied to clipboard
service/state: Only request balance if node is synced
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
Codecov Report
Merging #933 (7d6cea2) into main (718f364) will increase coverage by
0.15%
. The diff coverage is27.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.