Update BlockChain to record NodeInfo (#95)

This commit is contained in:
Matt K
2017-12-07 13:32:16 -06:00
committed by GitHub
parent 18163f970e
commit 921bde1089
21 changed files with 276 additions and 45 deletions
+3 -2
View File
@@ -16,10 +16,11 @@ func main() {
environment := flag.String("environment", "", "Environment name")
flag.Parse()
config := cmd.LoadConfig(*environment)
repository := cmd.LoadPostgres(config.Database)
fmt.Printf("Creating Geth Blockchain to: %s\n", config.Client.IPCPath)
blockchain := geth.NewGethBlockchain(config.Client.IPCPath)
repository := cmd.LoadPostgres(config.Database, blockchain.Node())
listener := blockchain_listener.NewBlockchainListener(
geth.NewGethBlockchain(config.Client.IPCPath),
blockchain,
[]core.BlockchainObserver{
observers.BlockchainLoggingObserver{},
observers.NewBlockchainDbObserver(repository),