6 log "github.com/sirupsen/logrus"
8 "github.com/vapor/federation/config"
9 "github.com/vapor/federation/database"
10 "github.com/vapor/federation/synchron"
14 cfg := config.NewConfig()
15 db, err := database.NewMySQLDB(cfg.MySQLConfig)
17 log.WithField("err", err).Panic("initialize mysql db error")
20 go synchron.NewMainchainKeeper(db, &cfg.Mainchain).Run()
21 go synchron.NewSidechainKeeper(db, &cfg.Sidechain).Run()
23 // keep the main func running in case of terminating goroutines