Update README, add State sync test (#1)

This commit is contained in:
Matt K authored and GitHub committed 2018-01-26 13:38:14 -06:00
1 parent afdeadeca1
commit 3b31e2a342
3 files changed
+31 -19

No files matched your search

+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)