code: func (am *AccountingMetrics) Close() {
  	close(am.reporter.quit)
  	// wait for reporter loop to finish saving metrics
  	// before reporter database is closed
  	select {
  	case <-time.After(10 * time.Second):
  		log.Error("accounting metrics reporter timeout")
  	case <-am.reporter.done:
  	}
  	am.reporter.db.Close()
  }
docs: //Close will be called when the node is being shutdown
  //for a graceful cleanup