code: func newStateSync(d *Downloader, root common.Hash) *stateSync {
  	return &stateSync{
  		d:       d,
  		sched:   state.NewStateSync(root, d.stateDB),
  		keccak:  sha3.NewLegacyKeccak256(),
  		tasks:   make(map[common.Hash]*stateTask),
  		deliver: make(chan *stateReq),
  		cancel:  make(chan struct{}),
  		done:    make(chan struct{}),
  	}
  }
docs: // newStateSync creates a new state trie download scheduler. This method does not
  // yet start the sync. The user needs to call run to initiate.