|
|
@ -3250,9 +3250,9 @@ func (t *healRequestSort) Merge() []TrieNodePathSet { |
|
|
|
// sortByAccountPath takes hashes and paths, and sorts them. After that, it generates
|
|
|
|
// sortByAccountPath takes hashes and paths, and sorts them. After that, it generates
|
|
|
|
// the TrieNodePaths and merges paths which belongs to the same account path.
|
|
|
|
// the TrieNodePaths and merges paths which belongs to the same account path.
|
|
|
|
func sortByAccountPath(paths []string, hashes []common.Hash) ([]string, []common.Hash, []trie.SyncPath, []TrieNodePathSet) { |
|
|
|
func sortByAccountPath(paths []string, hashes []common.Hash) ([]string, []common.Hash, []trie.SyncPath, []TrieNodePathSet) { |
|
|
|
var syncPaths []trie.SyncPath |
|
|
|
syncPaths := make([]trie.SyncPath, len(paths)) |
|
|
|
for _, path := range paths { |
|
|
|
for i, path := range paths { |
|
|
|
syncPaths = append(syncPaths, trie.NewSyncPath([]byte(path))) |
|
|
|
syncPaths[i] = trie.NewSyncPath([]byte(path)) |
|
|
|
} |
|
|
|
} |
|
|
|
n := &healRequestSort{paths, hashes, syncPaths} |
|
|
|
n := &healRequestSort{paths, hashes, syncPaths} |
|
|
|
sort.Sort(n) |
|
|
|
sort.Sort(n) |
|
|
|