code: func (ed *Dispatcher) clearTxRegistrations(closeChannel bool) {
  	if closeChannel {
  		for _, reg := range ed.txRegistrations {
  			logger.Debugf("Closing TX registration event channel for TxID [%s].", reg.TxID)
  			close(reg.Eventch)
  		}
  	}
  	ed.txRegistrations = make(map[string]*TxStatusReg)
  }
docs: // clearTxRegistrations removes all transaction registrations and closes the corresponding event channels.
  // The listener will receive a 'closed' event to indicate that the channel has been closed.