6 log "github.com/sirupsen/logrus"
8 "github.com/vapor/federation/api"
9 "github.com/vapor/federation/config"
10 "github.com/vapor/federation/database"
11 "github.com/vapor/federation/synchron"
15 cfg := config.NewConfig()
16 db, err := database.NewMySQLDB(cfg.MySQLConfig)
18 log.WithField("err", err).Panic("initialize mysql db error")
21 assetStore := database.NewAssetStore(db)
22 go synchron.NewMainchainKeeper(db, assetStore, cfg).Run()
23 go synchron.NewSidechainKeeper(db, assetStore, cfg).Run()
24 go api.NewServer(db, cfg).Run()
26 // keep the main func running in case of terminating goroutines