OSDN Git Service

feat(warder): add warder backbone (#181)
[bytom/vapor.git] / cmd / fedd / main.go
index 2ba8ec6..28d16cc 100644 (file)
@@ -5,6 +5,7 @@ import (
 
        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"
@@ -17,8 +18,10 @@ func main() {
                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