eth/downloader: flush state sync data before exit (#16280)

This commit is contained in:
gary rong
2018-04-09 20:46:27 +08:00
committed by Felix Lange
parent 0fac705ed0
commit 1100e8ba63
2 changed files with 14 additions and 6 deletions

View File

@ -212,7 +212,7 @@ func (s *TrieSync) Process(results []SyncResult) (bool, int, error) {
}
// Commit flushes the data stored in the internal membatch out to persistent
// storage, returning th enumber of items written and any occurred error.
// storage, returning the number of items written and any occurred error.
func (s *TrieSync) Commit(dbw ethdb.Putter) (int, error) {
// Dump the membatch into a database dbw
for i, key := range s.membatch.order {