code: func (m *Manager) ConnectBlock(dbTx database.Tx, block *btcutil.Block,
  	stxos []blockchain.SpentTxOut) error {
  
  	// Call each of the currently active optional indexes with the block
  	// being connected so they can update accordingly.
  	for _, index := range m.enabledIndexes {
  		err := dbIndexConnectBlock(dbTx, index, block, stxos)
  		if err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // ConnectBlock must be invoked when a block is extending the main chain.  It
  // keeps track of the state of each index it is managing, performs some sanity
  // checks, and invokes each indexer.
  //
  // This is part of the blockchain.IndexManager interface.