Handle events

- Adds interfaces for developers to build handlers that update data in
response to log events
- Resolves #29
This commit is contained in:
Matt Krump
2018-03-05 10:01:50 -06:00
parent ed907535e3
commit 06f78e0083
163 changed files with 586 additions and 22397 deletions
+2 -1
View File
@@ -29,12 +29,13 @@ func NewBlockchain(ipcPath string) *Blockchain {
blockchain := Blockchain{}
rpcClient, err := rpc.Dial(ipcPath)
if err != nil {
log.Println("Unable to connect to node")
log.Fatal(err)
}
client := ethclient.NewClient(rpcClient)
blockchain.node = node.Info(rpcClient)
if infura := isInfuraNode(ipcPath); infura {
blockchain.node.Id = "infura"
blockchain.node.ID = "infura"
blockchain.node.ClientName = "infura"
}
blockchain.client = client