From 4f339a1c81c4e47460e6b040926dc5a427671c1f Mon Sep 17 00:00:00 2001 From: Igor Mandrigin Date: Tue, 26 May 2020 17:02:19 +0300 Subject: [PATCH] reset the size of sortableBuffer when flushing to disk (#579) --- eth/downloader/stagedsync_stage_hashcheck.go | 1 + 1 file changed, 1 insertion(+) diff --git a/eth/downloader/stagedsync_stage_hashcheck.go b/eth/downloader/stagedsync_stage_hashcheck.go index d42a60b34..57b1ec007 100644 --- a/eth/downloader/stagedsync_stage_hashcheck.go +++ b/eth/downloader/stagedsync_stage_hashcheck.go @@ -284,6 +284,7 @@ func (b *sortableBuffer) FlushToDisk(datadir string) (string, error) { } b.entries = b.entries[:0] // keep the capacity + b.size = 0 return filename, nil }