Update README, add State sync test (#1)

This commit is contained in:
Matt K
2018-01-26 13:38:14 -06:00
committed by GitHub
parent afdeadeca1
commit 3b31e2a342
3 changed files with 31 additions and 19 deletions
+4
View File
@@ -11,6 +11,7 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/repositories"
"github.com/vulcanize/vulcanizedb/utils"
"github.com/spf13/cobra"
"log"
)
// syncCmd represents the sync command
@@ -58,6 +59,9 @@ func sync() {
defer ticker.Stop()
blockchain := geth.NewBlockchain(ipc)
if blockchain.LastBlock().Int64() == 0 {
log.Fatal("geth initial: state sync not finished")
}
repository := utils.LoadPostgres(databaseConfig, blockchain.Node())
validator := history.NewBlockValidator(blockchain, repository, 15)