diff --git a/beacon/light/api/light_api.go b/beacon/light/api/light_api.go index 033f876d07..644809fb4b 100755 --- a/beacon/light/api/light_api.go +++ b/beacon/light/api/light_api.go @@ -154,7 +154,6 @@ func (api *BeaconLightApi) httpGetf(format string, params ...any) ([]byte, error // equals update.NextSyncCommitteeRoot). // Note that the results are validated but the update signature should be verified // by the caller as its validity depends on the update chain. -// TODO handle valid partial results func (api *BeaconLightApi) GetBestUpdatesAndCommittees(firstPeriod, count uint64) ([]*types.LightClientUpdate, []*types.SerializedSyncCommittee, error) { resp, err := api.httpGetf("/eth/v1/beacon/light_client/updates?start_period=%d&count=%d", firstPeriod, count) if err != nil { diff --git a/beacon/light/api/light_api_test.go b/beacon/light/api/light_api_test.go deleted file mode 100644 index 2fc03e61ac..0000000000 --- a/beacon/light/api/light_api_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package api - -import ( - "bytes" - "io" - "net/http" - "testing" - - "github.com/ethereum/go-ethereum/common" -) - -type testFetcher struct { - response string -} - -type nopCloser struct { - io.Reader -} - -func (nopCloser) Close() error { return nil } - -func makeApi(response string) *BeaconLightApi { - return &BeaconLightApi{client: &testFetcher{response}} -} - -func (f *testFetcher) Do(req *http.Request) (*http.Response, error) { - res := new(http.Response) - res.StatusCode = 200 - res.Body = nopCloser{bytes.NewBufferString(f.response)} - return res, nil -} - -func TestGetCheckpointData(t *testing.T) { - resp := - `{ "data": - { - "header": {} - } -}` - _, err := makeApi(resp).GetCheckpointData(common.HexToHash("0xc78009fdf07fc56a11f122370658a353aaa542ed63e44c4bc15ff4cd105ab33c")) - t.Logf("err: %v", err) - //TODO finish this test -} diff --git a/beacon/light/sync/head_sync.go b/beacon/light/sync/head_sync.go index d35fa6aeea..9fef95b0df 100644 --- a/beacon/light/sync/head_sync.go +++ b/beacon/light/sync/head_sync.go @@ -133,7 +133,6 @@ func (s *HeadSync) processUnvalidated() { // setServerHead processes non-validated server head announcements and updates // the prefetch head if necessary. -// TODO report server failure if a server announces many heads that do not become validated soon. func (s *HeadSync) setServerHead(server request.Server, head types.HeadInfo) bool { if oldHead, ok := s.serverHeads[server]; ok { if head == oldHead {