code: func newBlockIndex(db database.DB, chainParams *chaincfg.Params) *blockIndex {
  	return &blockIndex{
  		db:          db,
  		chainParams: chainParams,
  		index:       make(map[chainhash.Hash]*blockNode),
  		dirty:       make(map[*blockNode]struct{}),
  	}
  }
docs: // newBlockIndex returns a new empty instance of a block index.  The index will
  // be dynamically populated as block nodes are loaded from the database and
  // manually added.