trie: rename TrieSync to Sync and improve hexToKeybytes (#16804)

This removes a golint warning: type name will be used as trie.TrieSync by
other packages, and that stutters; consider calling this Sync.

In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
This commit is contained in:
Wenbiao Zheng
2018-05-29 23:48:43 +08:00
committed by Felix Lange
parent d51faee240
commit 38c7eb0f26
5 changed files with 37 additions and 37 deletions

View File

@ -214,7 +214,7 @@ func (d *Downloader) runStateSync(s *stateSync) *stateSync {
type stateSync struct {
d *Downloader // Downloader instance to access and manage current peerset
sched *trie.TrieSync // State trie sync scheduler defining the tasks
sched *trie.Sync // State trie sync scheduler defining the tasks
keccak hash.Hash // Keccak256 hasher to verify deliveries with
tasks map[common.Hash]*stateTask // Set of tasks currently queued for retrieval