mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
add fixes (#8673)
This commit is contained in:
parent
97f00a1433
commit
466031ab8f
@ -29,7 +29,8 @@ func (d *DiagnosticClient) Setup() {
|
||||
|
||||
func (d *DiagnosticClient) runSnapshotListener() {
|
||||
go func() {
|
||||
ctx, ch, _ /*cancel*/ := diaglib.Context[diaglib.DownloadStatistics](context.Background(), 1)
|
||||
ctx, ch, cancel := diaglib.Context[diaglib.DownloadStatistics](context.Background(), 1)
|
||||
defer cancel()
|
||||
|
||||
rootCtx, _ := common.RootContext()
|
||||
|
||||
@ -37,6 +38,7 @@ func (d *DiagnosticClient) runSnapshotListener() {
|
||||
for {
|
||||
select {
|
||||
case <-rootCtx.Done():
|
||||
cancel()
|
||||
return
|
||||
case info := <-ch:
|
||||
d.snapshotDownload[info.StagePrefix] = info
|
||||
|
@ -184,10 +184,6 @@ func WaitForDownloader(logPrefix string, ctx context.Context, histV3 bool, capli
|
||||
defer logEvery.Stop()
|
||||
var m runtime.MemStats
|
||||
|
||||
/*diagnostics.RegisterProvider(diagnostics.ProviderFunc(func(ctx context.Context) error {
|
||||
return nil
|
||||
}), diagnostics.TypeOf(diagnostics.DownloadStatistics{}), log.Root())*/
|
||||
|
||||
// Check once without delay, for faster erigon re-start
|
||||
stats, err := snapshotDownloader.Stats(ctx, &proto_downloader.StatsRequest{})
|
||||
if err == nil && stats.Completed {
|
||||
|
Loading…
Reference in New Issue
Block a user