core/state, eth/downloader, trie: reset fast-failure on progress

This commit is contained in:
Péter Szilágyi
2016-10-31 13:55:12 +02:00
parent b8dec948d4
commit 90b16a3e85
7 changed files with 235 additions and 181 deletions

View File

@ -59,8 +59,10 @@ func (s *StateSync) Missing(max int) []common.Hash {
return (*trie.TrieSync)(s).Missing(max)
}
// Process injects a batch of retrieved trie nodes data.
func (s *StateSync) Process(list []trie.SyncResult) (int, error) {
// Process injects a batch of retrieved trie nodes data, returning if something
// was committed to the database and also the index of an entry if processing of
// it failed.
func (s *StateSync) Process(list []trie.SyncResult) (bool, int, error) {
return (*trie.TrieSync)(s).Process(list)
}