code: func NewChainIndexer(chainDb ethdb.Database, indexDb ethdb.Database, backend ChainIndexerBackend, section, confirm uint64, throttling time.Duration, kind string) *ChainIndexer {
  	c := &ChainIndexer{
  		chainDb:     chainDb,
  		indexDb:     indexDb,
  		backend:     backend,
  		update:      make(chan struct{}, 1),
  		quit:        make(chan chan error),
  		sectionSize: section,
  		confirmsReq: confirm,
  		throttling:  throttling,
  		log:         log.New("type", kind),
  	}
  	// Initialize database dependent fields and start the updater
  	c.loadValidSections()
  	c.ctx, c.ctxCancel = context.WithCancel(context.Background())
  
  	go c.updateLoop()
  
  	return c
  }
docs: // NewChainIndexer creates a new chain indexer to do background processing on
  // chain segments of a given size after certain number of confirmations passed.
  // The throttling parameter might be used to prevent database thrashing.