log "github.com/sirupsen/logrus"
+ "github.com/vapor/federation/api"
"github.com/vapor/federation/config"
"github.com/vapor/federation/database"
"github.com/vapor/federation/synchron"
log.WithField("err", err).Panic("initialize mysql db error")
}
- go synchron.NewMainchainKeeper(db, &cfg.Mainchain).Run()
- go synchron.NewSidechainKeeper(db, &cfg.Sidechain).Run()
+ assetStore := database.NewAssetStore(db)
+ go synchron.NewMainchainKeeper(db, assetStore, cfg).Run()
+ go synchron.NewSidechainKeeper(db, assetStore, cfg).Run()
+ go api.NewServer(db, cfg).Run()
// keep the main func running in case of terminating goroutines
var wg sync.WaitGroup