Skip to content

Commit

Permalink
Merge pull request #65 from Alethio/pool-count
Browse files Browse the repository at this point in the history
attestation pool count, avoid performance problem, disable for now.
  • Loading branch information
protolambda authored Oct 14, 2020
2 parents 1455e8d + 152cb5c commit b8f8607
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions beacon/v1/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,9 @@ func (s *V1HTTPClient) GetPeerCount() (int64, error) {
}

func (s *V1HTTPClient) GetAttestationsInPoolCount() (int64, error) {
path := "eth/v1/beacon/pool/attestations"
type attestationsResponse struct {
Data []struct {
} `json:"data,omitempty"`
}
response := new(attestationsResponse)
_, err := s.api.New().Get(path).ReceiveSuccess(response)
if err != nil {
return 0, err
}
return int64(len(response.Data)), nil
// TODO: There's an attestations pool endpoint, but it lists way too much.
// So much, that querying it a lot is similar to a self-induced DoS attack.
return 0, beacon.NotImplemented
}

func (s *V1HTTPClient) GetSyncStatus() (bool, error) {
Expand Down

0 comments on commit b8f8607

Please sign in to comment.