code: func New(opts ...options.Opt) *Dispatcher {
  	logger.Debug("Creating new dispatcher.")
  
  	params := defaultParams()
  	options.Apply(params, opts)
  
  	return &Dispatcher{
  		params:          *params,
  		handlers:        make(map[reflect.Type]Handler),
  		eventch:         make(chan interface{}, params.eventConsumerBufferSize),
  		txRegistrations: make(map[string]*TxStatusReg),
  		ccRegistrations: make(map[string]*ChaincodeReg),
  		state:           dispatcherStateInitial,
  		lastBlockNum:    math.MaxUint64,
  	}
  }
docs: // New creates a new Dispatcher.