aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorAaron Buchwald <[email protected]>2020-10-19 19:37:19 -0400
committerAaron Buchwald <[email protected]>2020-10-19 19:37:19 -0400
commita02b51064dcb5e4fe062237635d2b986591630f0 (patch)
tree38103ce52ba51ec7250c57e1f1c6418f8f5fc9d4 /internal
parent77a2d0f97f142261a351f0cdcc1d001d0cead4cf (diff)
Disable eth_syncing API call
Diffstat (limited to 'internal')
-rw-r--r--internal/ethapi/api.go29
1 files changed, 15 insertions, 14 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index 5190410..728fb07 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -77,20 +77,21 @@ func (s *PublicEthereumAPI) ProtocolVersion() hexutil.Uint {
// - pulledStates: number of state entries processed until now
// - knownStates: number of known state entries that still need to be pulled
func (s *PublicEthereumAPI) Syncing() (interface{}, error) {
- progress := s.b.Downloader().Progress()
-
- // Return not syncing if the synchronisation already completed
- if progress.CurrentBlock >= progress.HighestBlock {
- return false, nil
- }
- // Otherwise gather the block sync stats
- return map[string]interface{}{
- "startingBlock": hexutil.Uint64(progress.StartingBlock),
- "currentBlock": hexutil.Uint64(progress.CurrentBlock),
- "highestBlock": hexutil.Uint64(progress.HighestBlock),
- "pulledStates": hexutil.Uint64(progress.PulledStates),
- "knownStates": hexutil.Uint64(progress.KnownStates),
- }, nil
+ return nil, errors.New("not implemented in coreth") // Info or Health API should be used instead
+ // progress := s.b.Downloader().Progress()
+
+ // // Return not syncing if the synchronisation already completed
+ // if progress.CurrentBlock >= progress.HighestBlock {
+ // return false, nil
+ // }
+ // // Otherwise gather the block sync stats
+ // return map[string]interface{}{
+ // "startingBlock": hexutil.Uint64(progress.StartingBlock),
+ // "currentBlock": hexutil.Uint64(progress.CurrentBlock),
+ // "highestBlock": hexutil.Uint64(progress.HighestBlock),
+ // "pulledStates": hexutil.Uint64(progress.PulledStates),
+ // "knownStates": hexutil.Uint64(progress.KnownStates),
+ // }, nil
}
// PublicTxPoolAPI offers and API for the transaction pool. It only operates on data that is non confidential.