aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-10-31 19:55:12 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-10-31 20:19:14 +0800
commit90b16a3e85d82241f4505a7db0f95c2f312642a6 (patch)
tree9b8e11b1127bf96e19599a1f610684bb9d67d06f /core/state/sync.go
parentb8dec948d4d7d8257e63aeecf982c25aeec9a180 (diff)
downloadgo-tangerine-90b16a3e85d82241f4505a7db0f95c2f312642a6.tar
go-tangerine-90b16a3e85d82241f4505a7db0f95c2f312642a6.tar.gz
go-tangerine-90b16a3e85d82241f4505a7db0f95c2f312642a6.tar.bz2
go-tangerine-90b16a3e85d82241f4505a7db0f95c2f312642a6.tar.lz
go-tangerine-90b16a3e85d82241f4505a7db0f95c2f312642a6.tar.xz
go-tangerine-90b16a3e85d82241f4505a7db0f95c2f312642a6.tar.zst
go-tangerine-90b16a3e85d82241f4505a7db0f95c2f312642a6.zip
core/state, eth/downloader, trie: reset fast-failure on progress
Diffstat (limited to 'core/state/sync.go')
-rw-r--r--core/state/sync.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/state/sync.go b/core/state/sync.go
index ef2b4b84c..bab9c8e7e 100644
--- a/core/state/sync.go
+++ b/core/state/sync.go
@@ -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)
}