From 2eaee6ef406d6f9e07e268505a502577698e1f41 Mon Sep 17 00:00:00 2001 From: Wondertan Date: Wed, 31 Jan 2024 14:57:50 +0100 Subject: [PATCH] change todo --- sync/sync_head.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sync/sync_head.go b/sync/sync_head.go index ec1abad4..462af91e 100644 --- a/sync/sync_head.go +++ b/sync/sync_head.go @@ -25,12 +25,7 @@ func (s *Syncer[H]) Head(ctx context.Context, _ ...header.HeadOption[H]) (H, err return sbjHead, nil } // otherwise, request head from the network - // - // TODO(@Wondertan): Here is another potential networking optimization: - // * From sbjHead's timestamp and current time predict the time to the next header(TNH) - // * If now >= TNH && now <= TNH + (THP) header propagation time - // * Wait for header to arrive instead of requesting it - // * This way we don't request as we know the new network header arrives exactly + // TODO: Besides requesting we should listen for new gossiped headers and cancel request if so // // single-flight protection // ensure only one Head is requested at the time