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
+5 -13
View File
@@ -1,29 +1,21 @@
package integration_test
import (
"io/ioutil"
"log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/config"
"github.com/vulcanize/vulcanizedb/pkg/datastore/inmemory"
"github.com/vulcanize/vulcanizedb/pkg/geth"
"github.com/vulcanize/vulcanizedb/pkg/history"
"github.com/vulcanize/vulcanizedb/pkg/repositories/inmemory"
"github.com/vulcanize/vulcanizedb/test_config"
)
func init() {
log.SetOutput(ioutil.Discard)
}
var _ = Describe("Reading from the Geth blockchain", func() {
var blockchain *geth.Blockchain
var inMemory *inmemory.InMemory
BeforeEach(func() {
cfg, _ := config.NewConfig("private")
blockchain = geth.NewBlockchain(cfg.Client.IPCPath)
blockchain = geth.NewBlockchain(test_config.TestClientConfig.IPCPath)
inMemory = inmemory.NewInMemory()
})
@@ -52,8 +44,8 @@ var _ = Describe("Reading from the Geth blockchain", func() {
devNetworkNodeId := float64(1)
Expect(node.GenesisBlock).To(Equal(devNetworkGenesisBlock))
Expect(node.NetworkId).To(Equal(devNetworkNodeId))
Expect(len(node.Id)).To(Equal(128))
Expect(node.NetworkID).To(Equal(devNetworkNodeId))
Expect(len(node.ID)).To(Equal(128))
Expect(node.ClientName).To(ContainSubstring("Geth"))
close(done)